docs: def media_post(self, media_file, mime_type=None, description=None, focus=None):
          """
          Post an image. `media_file` can either be image data or
          a file name. If image data is passed directly, the mime
          type has to be specified manually, otherwise, it is
          determined from the file name. `focus` should be a tuple
          of floats between -1 and 1, giving the x and y coordinates
          of the images focus point for cropping (with the origin being the images
          center).
  
          Throws a `MastodonIllegalArgumentError` if the mime type of the
          passed data or file can not be determined properly.
  
          Returns a `media dict`_. This contains the id that can be used in
          status_post to attach the media file to a toot.
          """
          if mime_type is None and (isinstance(media_file, str) and os.path.isfile(media_file)):
              mime_type = guess_type(media_file)
              media_file = open(media_file, 'rb')
          elif isinstance(media_file, str) and os.path.isfile(media_file):
              media_file = open(media_file, 'rb')
  
          if mime_type is None:
              raise MastodonIllegalArgumentError('Could not determine mime type'
                                                 ' or data passed directly '
                                                 'without mime type.')
  
          random_suffix = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))
          file_name = "mastodonpyupload_" + str(time.time()) + "_" + str(random_suffix) + mimetypes.guess_extension(
              mime_type)
  
          if focus != None:
              focus = str(focus[0]) + "," + str(focus[1])
              
          media_file_description = (file_name, media_file, mime_type)
          return self.__api_request('POST', '/api/v1/media',
                                    files={'file': media_file_description},
                                    params={'description': description, 'focus': focus})