code: def find_node_group_membership(self, node):
          
          for group, nodelist in self.nodes.items():
              if node in nodelist:
                  return group
docs: Identifies the group for which a node belongs to.