'Declare a method to be a responder for a particular command.
This is a decorator.
Use like so::
class MyCommand(Command):
arguments = [(\'a\', ...), (\'b\', ...)]
class MyProto(AMP):
def myFunMethod(self, a, b):
MyCommand.responder(myFunMethod)
Notes: Although decorator syntax is not used within Twisted, this
function returns its argument and is therefore safe to use with
decorator syntax.
This is not thread safe.  Don\'t declare AMP subclasses in other
threads.  Don\'t declare responders outside the scope of AMP subclasses;
the behavior is undefined.
@param methodfunc: A function which will later become a method, which
has a keyword signature compatible with this command\'s L{argument} list
and returns a dictionary with a set of keys compatible with this
command\'s L{response} list.
@return: the methodfunc parameter.'

def responder(cls, methodfunc):

    CommandLocator._currentClassCommands.append((cls, methodfunc))
    return methodfunc
