class_docstr: Manages interactions between agents on messenger as well as direct interactions
  between agents and the messenger overworld.
docstr: Upload an attachment and return an attachment ID.
  
  :param payload:
      dict with the following format:
          {'type': <TYPE>, 'url': <URL>} or
          {'type': <TYPE>, 'filename': <FILENAME>, 'format': <FILEFORMAT>}.
          For example,
          {'type': 'image', 'filename': 'test.png', 'format': 'png'}
docstr_tok: ["Upload","an","attachment","and","return","an","attachment","ID",".",":","param","payload",":","dict","with","the","following","format",":","{","'type","'",":","<","TYPE",">",",","'url","'",":","<","URL",">","}","or","{","'type","'",":","<","TYPE",">",",","'filename","'",":","<","FILENAME",">",",","'format","'",":","<","FILEFORMAT",">","}",".","For","example",",","{","'type","'",":","'image","'",",","'filename","'",":","'test.png","'",",","'format","'",":","'png","'","}"]
code: def upload_attachment(self, payload):
      """
      Upload an attachment and return an attachment ID.
  
      :param payload:
          dict with the following format:
              {'type': <TYPE>, 'url': <URL>} or
              {'type': <TYPE>, 'filename': <FILENAME>, 'format': <FILEFORMAT>}.
              For example,
              {'type': 'image', 'filename': 'test.png', 'format': 'png'}
      """
      return self.sender.upload_fb_attachment(payload)
  
imports: import logging
  import os
  from parlai.core.agents import create_agent
  import parlai.chat_service.utils.logging
  import parlai.chat_service.utils.server
  from parlai.utils.io import PathManager
  from parlai.chat_service.services.messenger.agents import MessengerAgent
  from parlai.chat_service.core.socket import ChatServiceMessageSocket
  from parlai.chat_service.services.messenger.message_sender import MessageSender
  from parlai.chat_service.core.chat_service_manager import ChatServiceManager
label_desc: Use image node_id 20 for calling the MessengerManager obj's underlying member method code with example usage: obj.upload_attachment(payload) and returns: self