code: def get_num_records(filenames):
      def count_records(tf_record_filename):
          count = 0
          for _ in tf.compat.v1.python_io.tf_record_iterator(
              tf_record_filename
          ):
              count += 1
          return count
  
      nfile = len(filenames)
      return count_records(filenames[0]) * (nfile - 1) + count_records(
          filenames[-1]
      )
  
file_path: DALI/docs/examples/use_cases/tensorflow/resnet-n/nvutils/common.py
imports: import tensorflow
  from distutils.version import StrictVersion
label_desc: Use image node_id 2 for calling a global function with example usage: get_num_records(filenames) and returns: unknown, count