class_docstr: Retrieves neighbour indices according to class labels provided in constructor.
  Rows with the same label will be regarded as neighbours.
docstr: Constructs a LabeledNeighbourMap instance from a list of labels.
  :param labels list: List of labels for each data-point. One label per data-point.
docstr_tok: ["Constructs","a","LabeledNeighbourMap","instance","from","a","list","of","labels",".",":","param","labels","list",":","List","of","labels","for","each","data-point",".","One","label","per","data-point","."]
code: def __init__(self, labels):
      """Constructs a LabeledNeighbourMap instance from a list of labels.
      :param labels list: List of labels for each data-point. One label per data-point.
      """
      self.class_indicies = {
          label: np.argwhere(labels == label).ravel()
          for label in np.unique(labels)
      }
      self.labels = labels
  
imports: from collections.abc import Sequence
  import numpy
label_desc: Use image node_id 1 to create a new LabeledNeighbourMap object from inherited base classes: Sequence with example: obj = LabeledNeighbourMap(labels)