class example:

    def __init__(self, parent):
        self.parent = parent

def printit(self):
    print(self.__name__)
print(self.parent.__name__)
In python how to get name of a class inside its static method