Create or update an Author related to a post.

        :param bulk_mode: If True, minimize db operations by bulk creating post objects
        :param api_author: the data in the api for the Author
        :return: the up-to-date Author object

def process_post_author(self, bulk_mode, api_author):
        """
        Create or update an Author related to a post.

        :param bulk_mode: If True, minimize db operations by bulk creating post objects
        :param api_author: the data in the api for the Author
        :return: the up-to-date Author object
        """
        # get from the ref data map if in bulk mode, else look it up from the db
        if bulk_mode:
            author = self.ref_data_map["authors"].get(api_author["ID"])
            if author:
                self.update_existing_author(author, api_author)
            else:
                # if the author wasn't found (likely because it's a Byline or guest author, not a user),
                # go ahead and create the author now
                author = Author.objects.create(site_id=self.site_id,
                                               wp_id=api_author["ID"],
                                               **self.api_object_data("author", api_author))
        else:
            # do a direct db lookup if we're not in bulk mode
            author, created = self.get_or_create_author(api_author)
            if author and not created:
                self.update_existing_author(author, api_author)

        # add to the ref data map so we don't try to create it again
        if author:
            self.ref_data_map["authors"][api_author["ID"]] = author

        return author