code: def compose_mapping_node(self, anchor):
      start_event = self.get_event()
      tag = start_event.tag
      if tag is None or tag == "!":
          tag = self.resolve(MappingNode, None, start_event.implicit)
      node = MappingNode(
          tag,
          [],
          start_event.start_mark,
          None,
          flow_style=start_event.flow_style,
      )
      if anchor is not None:
          self.anchors[anchor] = node
      while not self.check_event(MappingEndEvent):
          # key_event = self.peek_event()
          item_key = self.compose_node(node, None)
          # if item_key in node.value:
          #    raise ComposerError("while composing a mapping", start_event.start_mark,
          #            "found duplicate key", key_event.start_mark)
          item_value = self.compose_node(node, item_key)
          # node.value[item_key] = item_value
          node.value.append((item_key, item_value))
      end_event = self.get_event()
      node.end_mark = end_event.end_mark
      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 9 for calling the Composer obj's underlying member method code with example usage: obj.compose_mapping_node(anchor) and returns: node