code: def node_labels(node_labels, node_indices):
      
      if len(node_labels) != len(node_indices):
          raise ValueError("Labels {0} must label every node {1}.".format(
              node_labels, node_indices))
  
      if len(node_labels) != len(set(node_labels)):
          raise ValueError("Labels {0} must be unique.".format(node_labels))
docs: Validate that there is a label for each node.