code: def _get_media_category(is_direct_message, file_type):
          
          if is_direct_message:
              prefix = 'dm'
          else:
              prefix = 'tweet'
  
          if file_type in IMAGE_MIMETYPES:
              if file_type == 'image/gif':
                  return prefix + '_gif'
              else:
                  return prefix + '_image'
          elif file_type == 'video/mp4':
              return prefix + '_video'
docs: :reference: https://developer.twitter.com/en/docs/direct-messages/message-attachments/guides/attaching-media
              :allowed_param: