human
Complete this python program:
def command(methodName, cmdClass=WrapperCommand):
assistant
#Here is the Python program you requested.

    """Wrap a method so it gets turned into command automatically.
    For use with Wrappables.
    Usage::
    | class Foo(Wrappable):
    |     objectType = "foo"
    |     def getUid(self):
    |         return self.id
    |     def _bar(self, x):
    |         return x + 1
    |     bar = command(\_bar\)
    The resulting callable will have signature identical to wrapped
    function, except that it expects journal as first argument, and
    returns a Deferred.
    """
    def wrapper(obj, journal, *args, **kwargs):
        return journal.executeCommand(cmdClass(methodName, obj, args, kwargs))
    return wrapper