code: def _sanitise_label_group(cls, labelgroup):
          
  
          if r'$\mid$' in labelgroup:
              label_components = labelgroup.split(r'$\mid$')
              good_labels = [l for l in
                             map(cls._sanitise_label, label_components)
                             if l is not None]
              if len(good_labels) == 0:
                  return None
              else:
                  return r'$\mid$'.join(good_labels)
          else:
              return cls._sanitise_label(labelgroup)
docs: Implement label hacks: Hide trailing @, remove label with leading @
  
          Labels split with $\mid$ symbol will be treated for each part.