class Base(object):

    def a(self):
        print('a x: %s' % x)

def b(self):
    print('b x: %s' % x)
Wrapped = wrap_class(Base, ('a',))
m = Wrapped()
m.a()
m.b()
m = wrap_class(Base, ('a',))()
Wrap calls to methods of a Python class