Invoke the Grpc Processor, delegating to the handler_function. If the handler_function has a single argument,
        pass the Message payload. If two arguments, pass the payload and headers as positional arguments:
        handler_function(payload, headers). If the handler function return is not of type(Message), create a new Message using
        the original header values (new id and timestamp).

        :param request: the message
        :param context: the request context
        :return: response message

def Process(self, request, context):
        """
        Invoke the Grpc Processor, delegating to the handler_function. If the handler_function has a single argument,
        pass the Message payload. If two arguments, pass the payload and headers as positional arguments:
        handler_function(payload, headers). If the handler function return is not of type(Message), create a new Message using
        the original header values (new id and timestamp).

        :param request: the message
        :param context: the request context
        :return: response message
        """
        logger.debug(request)
        message = Message.__from_protobuf_message__(request)
        sig = getfullargspec(self.handler_function)
        if len(sig.args) == 2:
            result = self.handler_function(message.payload, message.headers)
        elif len(sig.args) == 1:
            result = self.handler_function(message.payload)
        else:
            context.set_code(grpc.StatusCode.INTERNAL)
            context.set_details('wrong number of arguments for handler function - must be 1 or 2')
            raise RuntimeError('wrong number of arguments for handler function - must be 1 or 2')

        if self.component_type == StreamComponent.PROCESSOR:
            if type(result) == Message:
                return result.__to_protobuf_message__()
            else:
                headers = MessageHeaders()
                headers.copy(message.headers)
                return Message(result, headers).__to_protobuf_message__()