def partialmethod(func, arg):
return lambda *args, **kwargs: func(arg, *args, **kwargs)<EOL>
similar to functools.partial but return a lambda instead of a class so returned value may be
    turned into a method.