docs: def status_post(self, status, in_reply_to_id=None, media_ids=None,
                      sensitive=False, visibility=None, spoiler_text=None,
                      language=None, idempotency_key=None, content_type=None,
                      scheduled_at=None, poll=None):
          """
          Post a status. Can optionally be in reply to another status and contain
          media.
          
          `media_ids` should be a list. (If it's not, the function will turn it
          into one.) It can contain up to four pieces of media (uploaded via 
          `media_post()`_). `media_ids` can also be the `media dicts`_ returned 
          by `media_post()`_ - they are unpacked automatically.
  
          The `sensitive` boolean decides whether or not media attached to the post
          should be marked as sensitive, which hides it by default on the Mastodon
          web front-end.
  
          The visibility parameter is a string value and accepts any of:
          'direct' - post will be visible only to mentioned users
          'private' - post will be visible only to followers
          'unlisted' - post will be public but not appear on the public timeline
          'public' - post will be public
  
          If not passed in, visibility defaults to match the current account's
          default-privacy setting (starting with Mastodon version 1.6) or its
          locked setting - private if the account is locked, public otherwise
          (for Mastodon versions lower than 1.6).
  
          The `spoiler_text` parameter is a string to be shown as a warning before
          the text of the status.  If no text is passed in, no warning will be
          displayed.
  
          Specify `language` to override automatic language detection. The parameter
          accepts all valid ISO 639-2 language codes.
  
          You can set `idempotency_key` to a value to uniquely identify an attempt
          at posting a status. Even if you call this function more than once,
          if you call it with the same `idempotency_key`, only one status will
          be created.
  
          Pass a datetime as `scheduled_at` to schedule the toot for a specific time
          (the time must be at least 5 minutes into the future). If this is passed,
          status_post returns a `scheduled toot dict`_ instead.
  
          Pass `poll` to attach a poll to the status. An appropriate object can be
          constructed using `make_poll()`_
  
          Specify `content_type` to set the content type of your post on Pleroma.
          It accepts 'text/plain' (default), 'text/markdown', and 'text/html'.
          This parameter is not supported on Mastodon servers, but will be
          safely ignored if set.
  
          Returns a `toot dict`_ with the new status.
          """
          if in_reply_to_id != None:
              in_reply_to_id = self.__unpack_id(in_reply_to_id)
          
          if scheduled_at != None:
              scheduled_at = self.__consistent_isoformat_utc(scheduled_at)
          
          params_initial = locals()
  
          # Validate visibility parameter
          valid_visibilities = ['private', 'public', 'unlisted', 'direct']
          if params_initial['visibility'] == None:
              del params_initial['visibility']
          else:
              params_initial['visibility'] = params_initial['visibility'].lower()
              if params_initial['visibility'] not in valid_visibilities:
                  raise ValueError('Invalid visibility value! Acceptable '
                                  'values are %s' % valid_visibilities)
  
          if params_initial['language'] == None:
              del params_initial['language']
  
          if params_initial['sensitive'] is False:
              del [params_initial['sensitive']]
  
          headers = {}
          if idempotency_key != None:
              headers['Idempotency-Key'] = idempotency_key
              
          if media_ids is not None:
              try:
                  media_ids_proper = []
                  if not isinstance(media_ids, (list, tuple)):
                      media_ids = [media_ids]
                  for media_id in media_ids:
                      if isinstance(media_id, dict):
                          media_ids_proper.append(media_id["id"])
                      else:
                          media_ids_proper.append(media_id)
              except Exception as e:
                  raise MastodonIllegalArgumentError("Invalid media "
                                                     "dict: %s" % e)
  
              params_initial["media_ids"] = media_ids_proper
  
          if params_initial['content_type'] == None:
              del params_initial['content_type']
  
          use_json = False
          if not poll is None:
              use_json = True
  
          params = self.__generate_params(params_initial, ['idempotency_key'])
          return self.__api_request('POST', '/api/v1/statuses', params, headers = headers, use_json = use_json)