code: def anchor_node(self, node):
      if node in self.anchors:
          if self.anchors[node] is None:
              self.anchors[node] = self.generate_anchor(node)
      else:
          self.anchors[node] = None
          if isinstance(node, SequenceNode):
              for item in node.value:
                  self.anchor_node(item)
          elif isinstance(node, MappingNode):
              for key, value in node.value:
                  self.anchor_node(key)
                  self.anchor_node(value)
  
file_path: keepsake/python/keepsake/_vendor/yaml/serializer.py
imports: from .error import YAMLError
  from .events import *
  from .nodes import *
label_desc: Use image node_id 5 for calling the Serializer obj's underlying member method code with example usage: obj.anchor_node(node) without return types