code: def args_to_matching_eager(
      l, ctx, allowed_dtypes, default_dtype=None
  ):
      """Convert sequence `l` to eager same-type Tensors."""
      del ctx  # Unused
      if (not l) and (default_dtype is not None):
          return (
              default_dtype,
              [],
          )  # List is empty; assume default dtype.
      for x in l:
          if not isinstance(x, core_types.Value):
              break
      else:  # note: intentional for-else
          return (
              l[0]._datatype_enum(),
              l,
          )  # pylint: disable=protected-access
  
      # Is some input already a Tensor with a dtype?
      dtype = None
      for t in l:
          if isinstance(t, core_types.Value):
              dtype = t.dtype
              break
  
      if dtype is None:
          # Infer a dtype based on the first value, and use that dtype for the
          # remaining values.
  
          ret = []
          for t in l:
              tensor = None
              # First see if we can get a valid dtype with the default conversion
              # and see if it matches an allowed dtypes. Some ops like ConcatV2 may
              # not list allowed dtypes, in which case we should skip this.
              if dtype is None and allowed_dtypes:
                  tensor = tensor_conversion_registry.convert(t)
                  # If we did not match an allowed dtype, try again with the default
                  # dtype. This could be because we have an empty tensor and thus we
                  # picked the wrong type.
                  if tensor.dtype not in allowed_dtypes:
                      tensor = None
  
              if tensor is None:
                  tensor = tensor_conversion_registry.convert(
                      t, dtype, preferred_dtype=default_dtype
                  )
  
              ret.append(tensor)
              if dtype is None:
                  dtype = tensor.dtype
      else:
          ret = [
              tensor_conversion_registry.convert(t, dtype) for t in l
          ]
  
      # TODO(slebedev): consider removing this as it leaks a Keras concept.
      # pylint: disable=protected-access
      keras_symbolic_tensors = [
          x for x in ret if _is_keras_symbolic_tensor(x)
      ]
      if keras_symbolic_tensors:
          raise core._SymbolicException(
              "Using symbolic output of a Keras layer during eager execution "
              "{}".format(keras_symbolic_tensors)
          )
      # pylint: enable=protected-access
      return dtype.as_datatype_enum, ret
  
imports: from google.protobuf import text_format
  from tensorflow.core.framework import tensor_pb2
  from tensorflow.python import pywrap_tfe
  from tensorflow.python.eager import core
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_conversion_registry
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.types import core
  from tensorflow.python.util import compat
label_desc: Use image node_id 13 for calling a global function with example usage: args_to_matching_eager(l, ctx, allowed_dtypes, default_dtype) and returns: dtype,  ret, default_dtype,  list, l,  l