class_docstr: A placeholder to capture an object.
  
  This is useful when we need to capture a Python object in the Tensorflow
  control flow body function and use it outside the control flow.
class_docstr_tok: ["A","placeholder","to","capture","an","object",".","This","is","useful","when","we","need","to","capture","a","Python","object","in","the","Tensorflow","control","flow","body","function","and","use","it","outside","the","control","flow","."]
code: def capture(self, o):
      if self._captured:
          raise RuntimeError(
              "InternalError: Object can capture only once. Please file bug."
          )
  
      self._captured = True
      self._object = o
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import re
  import mesh_tensorflow
  import numpy
  import six
  from six.moves import range
  from six.moves import zip
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  from mesh_tensorflow.experimental import input_reader
  from mesh_tensorflow.experimental import unet
  from tensorflow.contrib import summary
  from tensorflow.contrib import tpu
  from tensorflow.contrib.tpu.python.tpu import device_assignment
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.platform import flags
  from tensorflow.python.tpu.ops import tpu_ops
label_desc: Use image node_id 2 for calling the _CapturedObject obj's underlying member method code with example usage: obj.capture(o) without return types