<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_message_from_call(self, *args, **kwargs):
        '''\
        Get message object from a call.

        :raises: :py:exc:`TypeError` (if the format is not what we expect)

        This is where arguments to nodes are turned into Messages. Arguments
        are parsed in the following order:

         - A single positional argument (a :py:class:`dict`)
         - No positional arguments and a number of keyword arguments
        '''
        if len(args) == 1 and isinstance(args[0], dict):
            # then it's a message
            self.logger.debug('called with arg dictionary')
            result = args[0]
        elif len(args) == 0 and kwargs != {}:
            # then it's a set of kwargs
            self.logger.debug('called with kwargs')
            result = kwargs
        else:
            # it's neither, and we don't handle that
            self.logger.error(
                'get_message_from_call could not handle "%r", "%r"',
                args, kwargs
            )
            raise TypeError('Pass either keyword arguments or a dictionary argument')

        return self.message_class(result)