def get_data_files(data_sources):
  """Get list of data files from data_sources.

  Args:
    data_sources: a list or tuple of data file paths.

  Returns:
    A list of file paths.

  Raises:
    ValueError: if not data files are not found
  """
  # TODO(alanesuhr): Verify this is necessary for sharded TFRecord files?
  data_files = []
  for source in data_sources:
    if source.endswith('@*'):
      data_files += gfile.Glob(source[:-2] + '*')
    elif '@' in source:
      data_files += gfile.GenerateShardedFilenames(source)
    elif '*' in source or '?' in source or '[' in source:
      data_files += gfile.Glob(source)
    else:
      data_files.append(source)
  if not data_files:
    raise ValueError('No data files found in %s' % data_sources)
  return data_files
Get list of data files from data_sources.

  Args:
    data_sources: a list or tuple of data file paths.

  Returns:
    A list of file paths.

  Raises:
    ValueError: if not data files are not found
  
language/xsp/model/input_utils.py