code: def count_records(file_list, stop_at=None):
      """Counts number of records in files from `file_list` up to `stop_at`.
  
      Args:
        file_list: List of TFRecord files to count records in.
        stop_at: Optional number of records to stop counting at.
  
      Returns:
        Integer number of records in files from `file_list` up to `stop_at`.
      """
      num_records = 0
      for tfrecord_file in file_list:
          tf.logging.info("Counting records in %s.", tfrecord_file)
          for _ in tf.python_io.tf_record_iterator(tfrecord_file):
              num_records += 1
              if stop_at and num_records >= stop_at:
                  tf.logging.info(
                      "Number of records is at least %d.", num_records
                  )
                  return num_records
      tf.logging.info("Total records: %d", num_records)
      return num_records
  
imports: import math
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling a global function with example usage: count_records(file_list, stop_at) and returns: num_records, num_records