docs: def to_task(self):
          """Return a task object representing this message."""
          from google.appengine.api.taskqueue import Task
  
          task_args = self.get_task_args().copy()
  
          payload = None
          if 'payload' in task_args:
              payload = task_args.pop('payload')
  
          kwargs = {
              'method': METHOD_TYPE,
              'payload': json.dumps(payload)
          }
  
          kwargs.update(task_args)
  
          return Task(**kwargs)