code: def compose_node(self, parent, index):
      if self.check_event(AliasEvent):
          event = self.get_event()
          anchor = event.anchor
          if anchor not in self.anchors:
              raise ComposerError(
                  None,
                  None,
                  "found undefined alias %r" % anchor,
                  event.start_mark,
              )
          return self.anchors[anchor]
      event = self.peek_event()
      anchor = event.anchor
      if anchor is not None:
          if anchor in self.anchors:
              raise ComposerError(
                  "found duplicate anchor %r; first occurrence"
                  % anchor,
                  self.anchors[anchor].start_mark,
                  "second occurrence",
                  event.start_mark,
              )
      self.descend_resolver(parent, index)
      if self.check_event(ScalarEvent):
          node = self.compose_scalar_node(anchor)
      elif self.check_event(SequenceStartEvent):
          node = self.compose_sequence_node(anchor)
      elif self.check_event(MappingStartEvent):
          node = self.compose_mapping_node(anchor)
      self.ascend_resolver()
      return node
  
file_path: catboost/contrib/python/PyYAML/py3/yaml/composer.py
imports: from .error import MarkedYAMLError
  from .events import *
  from .nodes import *
label_desc: Use image node_id 6 for calling the Composer obj's underlying member method code with example usage: obj.compose_node(parent, index) and returns: node, self