code: def upload_media(self, **params):
          
          # https://developer.twitter.com/en/docs/media/upload-media/api-reference/get-media-upload-status
          if params and params.get('command', '') == 'STATUS':
              return self.get('https://upload.twitter.com/1.1/media/upload.json', params=params)
  
          return self.post('https://upload.twitter.com/1.1/media/upload.json', params=params)
docs: Uploads media file to Twitter servers. The file will be available to be attached
          to a status for 60 minutes. To attach to a update, pass a list of returned media ids
          to the :meth:`update_status` method using the ``media_ids`` param.
  
          Docs:
          https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-upload