import tensorflow as tf

      `session.run`) with these TensorFlow objects as the input.
    """
    # Split the fetches to two structures.
    py_fetches, tf_fetches = [], []
    placeholder_empty_tuple = ()
    assert isinstance(fetches, list), 'fetches should be a list.'
    for fetch in fetches:
      if isinstance(fetch, dict):
        d_py, d_tf = py_utils.split_dict_py_tf(fetch)
        py_fetches.append(d_py)
        tf_fetches.append(d_tf)
      elif tf.is_tensor(fetch):
        py_fetches.append(None)
        tf_fetches.append(fetch)
      else:
        py_fetches.append(fetch)
        # This empty tuple is here as a marker to retain the value from
        # py_fetches, while keeping the list length same for simplicity of
        # reconstruction. This is effectively None, but self.evaluate does not
        # accept None as an input argument.
        tf_fetches.append(placeholder_empty_tuple)

