docs: def process_post_category(self, bulk_mode, api_category):
          """
          Create or update a Category related to a post.
  
          :param bulk_mode: If True, minimize db operations by bulk creating post objects
          :param api_category: the API data for the Category
          :return: the Category object
          """
          category = None
  
          # try to get from the ref data map if in bulk mode
          if bulk_mode:
              category = self.ref_data_map["categories"].get(api_category["ID"])
  
          # double check the db before giving up, we may have sync'd it in a previous run
          if not category:
              category, created = Category.objects.get_or_create(site_id=self.site_id,
                                                                 wp_id=api_category["ID"],
                                                                 defaults=self.api_object_data("category", api_category))
  
              if category and not created:
                  self.update_existing_category(category, api_category)
  
              # add to ref data map so later lookups work
              if category:
                  self.ref_data_map["categories"][api_category["ID"]] = category
  
          return category