code: def post_create(self, tags, file_=None, rating=None, source=None,
                      rating_locked=None, note_locked=None, parent_id=None,
                      md5=None):
          
          if file_ or source is not None:
              params = {
                  'post[tags]': tags,
                  'post[source]': source,
                  'post[rating]': rating,
                  'post[is_rating_locked]': rating_locked,
                  'post[is_note_locked]': note_locked,
                  'post[parent_id]': parent_id,
                  'md5': md5}
              file_ = {'post[file]': open(file_, 'rb')}
              return self._get('post/create', params, 'POST', file_)
          else:
              raise PybooruAPIError("'file_' or 'source' is required.")
docs: Function to create a new post (Requires login).
  
          There are only two mandatory fields: you need to supply the
          'tags', and you need to supply the 'file_', either through a
          multipart form or through a source URL (Requires login) (UNTESTED).
  
          Parameters:
              tags (str): A space delimited list of tags.
              file_ (str): The file data encoded as a multipart form. Path of
                           content.
              rating (str): The rating for the post. Can be: safe, questionable,
                            or explicit.
              source (str): If this is a URL, Moebooru will download the file.
              rating_locked (bool): Set to True to prevent others from changing
                                    the rating.
              note_locked (bool): Set to True to prevent others from adding notes.
              parent_id (int): The ID of the parent post.
              md5 (str): Supply an MD5 if you want Moebooru to verify the file
                         after uploading. If the MD5 doesn't match, the post is
                         destroyed.
  
          Raises:
              PybooruAPIError: When file or source are empty.