code: def check_labels_file_header(filename):
      """Validate that filename corresponds to labels for the MNIST dataset."""
      with tf.gfile.Open(filename, "rb") as f:
          magic = read32(f)
          read32(f)  # num_items, unused
          if magic != 2049:
              raise ValueError(
                  "Invalid magic number %d in MNIST file %s"
                  % (magic, f.name)
              )
  
file_path: tensorflow-upstream/tensorflow/lite/tutorials/dataset.py
imports: import gzip
  import os
  import shutil
  import tempfile
  import urllib
  import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: check_labels_file_header(filename) without return types