如何在python 3.8中获取类类型参数? [关闭]

I want to get a class type parameter, but I don't know how to do it. I've looked everywhere, but I haven't found an answer. Here's the code with the imaginary method get_attr I'm waiting for if it exists:

class test:
    def get_attr(self):
        pass

obj: test[int] = test()
obj.get_attr()
#return int

obj2: test[str, list] = test()
obj2.get_attr()
#return (str, list)

是否存在这样的功能或方法?如果没有,我可以创建它吗? (顺便说一下,我不知道它是否在python xD中被命名为“类类型参数”,我已经在Java和在线研究中看到了它。)