code: def _auto_kpath_labels(kpt_list):
          
  
          # Build dict of labels
          label_i = 1
          kpt_labels = {}
          for kpt in chain(*kpt_list):
              if tuple(kpt) in kpt_labels:
                  continue
              else:
                  kpt_labels.update({tuple(kpt): '({})'.format(label_i)})
                  label_i += 1
  
          # Read out into nested lists
          kpath_labels = [[kpt_labels[tuple(kpt)] for kpt in segment]
                          for segment in kpt_list]
  
          return kpath_labels
docs: Get a default set of labels (1), (2), (3)... for a k-point path
  
          Repeated points will be identified and the labels re-used.
  
          Args:
              kpt_list (list): Nested list representing k-point path segments,
                  e.g.::
  
                    [[[0., 0., 0.], [0., 0., 0.5], [0., 0.5, 0.5]],
                     [[0.5, 0.5, 0.], [0., 0., 0.]]]
  
          Returns:
              list: Corresponding nested list of labels, e.g.::
  
                [['(1)', '(2)', '(3)'], ['(4)', '(1)']]