code: def _cast_label(label):
      """Converts the label into the appropriate string version."""
      if isinstance(label, str):
          return label
      elif isinstance(label, bool):
          return "True" if label else "False"
      elif isinstance(label, int):
          assert label in (0, 1)
          return str(label)
      else:
          raise ValueError(f"Invalid label format: {type(label)}")
  
file_path: datasets/tensorflow_datasets/text/super_glue.py
imports: from __future__ import annotations
  import json
  import os
  from etils import epath
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling a global function with example usage: _cast_label(label) and returns: label, unknown, str