original_docstring: Turn an XML stream into a node dict
          This is duplicating a bunch of code from WordPressImporter. To test the ItemsCache
          instance on WordPressImporter.
          
docstring: Turn an XML stream into a node dict
  This is duplicating a bunch of code from WordPressImporter. To test the ItemsCache
  instance on WordPressImporter.
docstring_tokens: Turn an XML stream into a node dict This is duplicating a bunch of code from WordPressImporter . To test the ItemsCache instance on WordPressImporter .
code: def process_item(self, xml_stream):
          """Turn an XML stream into a node dict
          This is duplicating a bunch of code from WordPressImporter. To test the ItemsCache
          instance on WordPressImporter.
          """
          self.importer = WordpressImporter(xml_stream)
          xml_doc = pulldom.parse(xml_stream)
          for event, node in xml_doc:
              if event == pulldom.START_ELEMENT and node.tagName == "item":
                  xml_doc.expandNode(node)
                  item = node_to_dict(node)
                  post_type = item.get("wp:post_type")
                  if post_type in getattr(
                      settings, "WORDPRESS_IMPORT_HOOKS_ITEMS_TO_CACHE", {}
                  ):
                      self.importer.items_cache.add_item_to_cache(post_type, item)
  
          return self.importer.items_cache
code_tokens: def process_item ( self , xml_stream ) : self . importer = WordpressImporter ( xml_stream ) xml_doc = pulldom . parse ( xml_stream ) for event , node in xml_doc : if event == pulldom . START_ELEMENT and node . tagName == "item" : xml_doc . expandNode ( node ) item = node_to_dict ( node ) post_type = item . get ( "wp:post_type" ) if post_type in getattr ( settings , "WORDPRESS_IMPORT_HOOKS_ITEMS_TO_CACHE" , { } ) : self . importer . items_cache . add_item_to_cache ( post_type , item ) return self . importer . items_cache
short_docstring: Turn an XML stream into a node dict
  This is duplicating a bunch of code from WordPressImporter.
short_docstring_tokens: Turn an XML stream into a node dict This is duplicating a bunch of code from WordPressImporter .
comment: """Turn an XML stream into a node dict
          This is duplicating a bunch of code from WordPressImporter. To test the ItemsCache
          instance on WordPressImporter.
          """