code: def _get_file_names(file_pattern, shuffle):
      """Parse list of file names from pattern, optionally shuffled.
  
      Args:
        file_pattern: File glob pattern, or list of glob patterns.
        shuffle: Whether to shuffle the order of file names.
  
      Returns:
        List of file names matching `file_pattern`.
  
      Raises:
        ValueError: If `file_pattern` is empty, or pattern matches no files.
      """
      if isinstance(file_pattern, list):
          if not file_pattern:
              raise ValueError(
                  "Argument `file_pattern` should not be empty."
              )
          file_names = []
          for entry in file_pattern:
              file_names.extend(gfile.Glob(entry))
      else:
          file_names = list(gfile.Glob(file_pattern))
  
      if not file_names:
          raise ValueError(
              f"No files match `file_pattern` {file_pattern}."
          )
  
      # Sort files so it will be deterministic for unit tests.
      if not shuffle:
          file_names = sorted(file_names)
      return file_names
  
imports: import collections
  import csv
  import functools
  import gzip
  import numpy
  from tensorflow.python import tf2
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.data.experimental.ops import error_ops
  from tensorflow.python.data.experimental.ops import parsing_ops
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import map_op
  from tensorflow.python.data.ops import options
  from tensorflow.python.data.ops import readers
  from tensorflow.python.data.util import convert
  from tensorflow.python.data.util import nest
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import gen_experimental_dataset_ops
  from tensorflow.python.ops import io_ops
  from tensorflow.python.platform import gfile
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 15 for calling a global function with example usage: _get_file_names(file_pattern, shuffle) and returns: file_names