def func(cls):
    print('I am a class method')
A.func = classmethod(func)
the_name = 'other_func'
setattr(A, the_name, classmethod(func))
How can I dynamically create class methods for a class in python