code: def _extract_mnist_labels(labels_filepath, num_labels):
      with tf.io.gfile.GFile(labels_filepath, "rb") as f:
          f.read(8)  # header
          buf = f.read(num_labels)
          labels = np.frombuffer(buf, dtype=np.uint8).astype(np.int64)
          return labels
  
imports: import os
  import numpy
  from six.moves import urllib
  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: _extract_mnist_labels(labels_filepath, num_labels) and returns: labels