'Register a response to a L{callRemote} command.
@param commandType: a subclass of C{amp.Command}.
@param kwargs: Keyword arguments taken by the command, a C{dict}.
@param response: The response to the command.'

def register_response(self, command, kwargs, response):

    if isinstance(response, Exception):
        response = Failure(response)
    else:
        try:
            command.makeResponse(response, AMP())
        except KeyError:
            raise InvalidSignature('Bad    registered    response')
    self._responses[self._makeKey(command, kwargs)] = response
