code: def validate_data_files(problem, data_files, min_size):
    
    # 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
docs: Validate presence and minimum size of files.