message: Use a new list to store the captured inputs, to avoid modifying the original
  inputs passed in by the caller. This can make debugging easier under some
  cases.
diff: @@ -583,14 +583,16 @@ class FuncGraph(ops.Graph):
  # backward accumulators in the original graph before we create placeholders
  # to capture the inputs.
  ctxt = ops.get_default_graph()._control_flow_context # pylint: disable=protected-access
  - for i, inp in enumerate(inputs):
  + # Use a different list to avoid modifying the original inputs list.
  + captured_inputs = []
  + for inp in inputs:
  # TPU Estimator defines a control flow context with no AddValue method.
  if ctxt is not None and hasattr(ctxt, "AddValue"):
  inp = ctxt.AddValue(inp)
  inp = self.capture(inp)
  - inputs[i] = inp
  + captured_inputs.append(inp)
  return super(FuncGraph, self)._create_op_internal( # pylint: disable=protected-access
  - op_type, inputs, dtypes, input_types, name, attrs, op_def,
  + op_type, captured_inputs, dtypes, input_types, name, attrs, op_def,
  compute_device)
  def capture(self, tensor, name=None, shape=None):
  