code: def validate_data_files(problem, data_files, min_size):
      """Validate presence and minimum size of files."""
      # Check that all files are present
      data_dir = os.path.split(data_files[0])[0]
      out_filepaths = problem.out_filepaths(data_dir)
      missing_filepaths = set(out_filepaths) - set(data_files)
      if missing_filepaths:
          tf.logging.error(
              "Missing %d data files", len(missing_filepaths)
          )
  
      # Check that each file is at least 100M
      too_small = []
      for data_file in data_files:
          length = get_length(data_file)
          if length < min_size:
              too_small.append(data_file)
      if too_small:
          tf.logging.error("%d files too small", len(too_small))
  
      bad_files = too_small + list(missing_filepaths)
      return bad_files
  
file_path: tensor2tensor/tensor2tensor/data_generators/wikisum/validate_data.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import json
  import os
  import numpy
  import six
  from six.moves import zip
  from tensor2tensor.data_generators.wikisum import wikisum
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling a global function with example usage: validate_data_files(problem, data_files, min_size) and returns: bad_files