Here you go. You should know that self.test is already bound, because by the time you are in __init__, the instance is already created and its methods are bound. Therefore, you must access the unrelated member using the im_func member and bind it to the MethodType method.
import types
class container():
def __init__(self):
self.info = "undefiend info attribute"
def use(self):
print self.info
class tree():
def __init__(self):
b = container()
b.info = "b info attribute"
b.use = types.MethodType(self.test.im_func, b, b.__class__)
print b.use()
def test(self):
return "test: "+self.info
if __name__ == "__main__":
b = tree()