code: def get_tensors_inputs(placeholders, tensors, names):
      """
      Args:
          placeholders (list[Tensor]):
          tensors (list[Tensor]): list of tf.Tensor
          names (list[str]): names matching the given tensors
  
      Returns:
          list[Tensor]: inputs to used for the tower function,
              with the corresponding placeholders replaced by tensors.
      """
      assert len(tensors) == len(
          names
      ), "Input tensors {} and input names {} have different length!".format(
          tensors, names
      )
      ret = copy.copy(placeholders)
      placeholder_names = [p.name for p in placeholders]
      for name, tensor in zip(names, tensors):
          tensorname = get_op_tensor_name(name)[1]
          try:
              idx = placeholder_names.index(tensorname)
          except ValueError:
              logger.error(
                  "Name {} is not a model input!".format(tensorname)
              )
              raise
          ret[idx] = tensor
      return ret
  
imports: import copy
  from abc import ABCMeta, abstractmethod
  from contextlib import contextmanager
  import six
  import tensorflow
  from ..callbacks.base import CallbackFactory
  from ..tfutils.common import get_op_tensor_name
  from ..utils import logger
  from ..utils.argtools import call_only_once, memoized_method
  from ..compat import tfv1
label_desc: Use image node_id 2 for calling a global function with example usage: get_tensors_inputs(placeholders, tensors, names) and returns: ret