import types

class A():
	def __init__(self):
		self.value = 'hui'

	def method1(self):
		print(self.value)
		
	@staticmethod
	def method3():
		print('sosi')

def test(self):
	print(self.value)

obj = A()
obj.method2 = types.MethodType(test, obj)
obj.method4 = test

print(obj.method1)
print(obj.method2)
print(obj.method3)
print(obj.method4)