def dispatchCommand(self, box):
        """
        A box with a _command key was received.

        Dispatch it to a local handler call it.

        @param proto: an AMP instance.
        @param box: an AmpBox to be dispatched.
        """
        cmd = box[COMMAND]
        responder = self.locator.locateResponder(cmd)
        if responder is None:
            description = "Unhandled Command: %r" % (cmd,)
            return fail(RemoteAmpError(
                    UNHANDLED_ERROR_CODE,
                    description,
                    False,
                    local=Failure(UnhandledCommand())))
        return maybeDeferred(responder, box)

        A box with a _command key was received.

        Dispatch it to a local handler call it.

        @param proto: an AMP instance.
        @param box: an AmpBox to be dispatched.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/amp.py