code: def named_values(col_names, tuples):
      output = []
      if isinstance(col_names, list):
          for t in tuples:
              output.append(
                  {name: value for (name, value) in zip(col_names, t)}
              )
      else:
          for t in tuples:
              output.append(
                  {
                      name: value
                      for (name, value) in zip((col_names,), (t,))
                  }
              )
      return output
  
file_path: ray/python/ray/data/tests/util.py
imports: import functools
  import os
  import tempfile
  from contextlib import contextmanager
  import ray
  from ray.data._internal.execution.interfaces.physical_operator import DataOpTask, MetadataOpTask, PhysicalOperator
label_desc: Use image node_id 4 for calling a global function with example usage: named_values(col_names, tuples) and returns: output