code: def _decode_label(label):
      
      if isinstance(label, list):
          return tuple(_decode_label(v) for v in label)
      return label
docs: Convert a list label into a tuple. Works recursively on nested lists.