human
4.2 Defining instance attributes
Instance attributes (methods and variables) are only accesible when the class has been instantiated. Of the instance methods, one of the most important is the constructor of the class. All instance methods must include a parameter which holds the data instantiated. By convention, this parameter is called self.
assistant
#Here is the Python code you requested.
class A:
    def __init__(self):
        print('Constructor called')
        
    def setter(self, x=1):
        self.x = x
        
    def getter(self):
        return self.x
a = A()

a.setter(2)
print(a.getter())

hasattr(A, 'setter')