code: def _infer_column_names(
      filenames, field_delim, use_quote_delim, file_io_fn
  ):
      """Infers column names from first rows of files."""
      csv_kwargs = {
          "delimiter": field_delim,
          "quoting": csv.QUOTE_MINIMAL
          if use_quote_delim
          else csv.QUOTE_NONE,
      }
      with file_io_fn(filenames[0]) as f:
          try:
              column_names = next(csv.reader(f, **csv_kwargs))
          except StopIteration:
              raise ValueError(
                  "Failed when reading the header line of "
                  f"{filenames[0]}. Is it an empty file?"
              )
  
      for name in filenames[1:]:
          with file_io_fn(name) as f:
              try:
                  if next(csv.reader(f, **csv_kwargs)) != column_names:
                      raise ValueError(
                          "All input CSV files should have the same column names in the "
                          f"header row. File {name} has different column names."
                      )
              except StopIteration:
                  raise ValueError(
                      "Failed when reading the header line of "
                      f"{name}. Is it an empty file?"
                  )
      return column_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 7 for calling a global function with example usage: _infer_column_names(filenames, field_delim, use_quote_delim, file_io_fn) and returns: column_names