code: def _add_item_to_the_feed(self, feed, item):
      title = Markup(item.title).striptags()
      link = self.urljoiner(self.site_url, item.url)
  
      if isinstance(feed, Rss201rev2Feed):
          # RSS feeds use a single tag called 'description' for both the full
          # content and the summary
          content = None
          if self.settings.get("RSS_FEED_SUMMARY_ONLY"):
              description = item.summary
          else:
              description = item.get_content(self.site_url)
  
      else:
          # Atom feeds have two different tags for full content (called
          # 'content' by feedgenerator) and summary (called 'description' by
          # feedgenerator).
          #
          # It does not make sense to have the summary be the
          # exact same thing as the full content. If we detect that
          # they are we just remove the summary.
          content = item.get_content(self.site_url)
          description = item.summary
          if description == content:
              description = None
  
      categories = []
      if hasattr(item, "category"):
          categories.append(item.category)
      if hasattr(item, "tags"):
          categories.extend(item.tags)
  
      feed.add_item(
          title=title,
          link=link,
          unique_id=get_tag_uri(link, item.date),
          description=description,
          content=content,
          categories=categories or None,
          author_name=getattr(item, "author", ""),
          pubdate=set_date_tzinfo(
              item.date, self.settings.get("TIMEZONE", None)
          ),
          updateddate=set_date_tzinfo(
              item.modified, self.settings.get("TIMEZONE", None)
          )
          if hasattr(item, "modified")
          else None,
      )
  
file_path: pelican/pelican/writers.py
imports: import logging
  import os
  from posixpath import join
  from urllib.parse import urljoin
  from feedgenerator import Atom1Feed, Rss201rev2Feed, get_tag_uri
  from markupsafe import Markup
  from pelican.paginator import Paginator
  from pelican.plugins import signals
  from pelican.utils import get_relative_path, path_to_url, sanitised_join, set_date_tzinfo
label_desc: Use image node_id 3 for calling the Writer obj's underlying member method code with example usage: obj._add_item_to_the_feed(feed, item) without return types