class_docstr: Holds a Tensor which a tf.function can capture.
  
  `CapturableResource`s are discovered by traversing the graph of object
  attributes, e.g. during `tf.saved_model.save`. They are excluded from the
  scope-based tracking of `TrackableResource`; generally things that require
  initialization should inherit from `TrackableResource` instead of
  `CapturableResource` directly.
docstr: Initialize the `CapturableResource`.
  
  Args:
    device: A string indicating a required placement for this resource,
      e.g. "CPU" if this resource must be created on a CPU device. A blank
      device allows the user to place resource creation, so generally this
      should be blank unless the resource only makes sense on one device.
docstr_tok: ["Initialize","the","`","CapturableResource","`",".","Args",":","device",":","A","string","indicating","a","required","placement","for","this","resource",",","e.g",".","``","CPU","''","if","this","resource","must","be","created","on","a","CPU","device",".","A","blank","device","allows","the","user","to","place","resource","creation",",","so","generally","this","should","be","blank","unless","the","resource","only","makes","sense","on","one","device","."]
code: def __init__(self, device=""):
      """Initialize the `CapturableResource`.
  
      Args:
        device: A string indicating a required placement for this resource,
          e.g. "CPU" if this resource must be created on a CPU device. A blank
          device allows the user to place resource creation, so generally this
          should be blank unless the resource only makes sense on one device.
      """
      self._resource_handle_value = None
      self._resource_device = device
      self._self_destruction_context = (
          context.eager_mode
          if context.executing_eagerly()
          else ops.get_default_graph().as_default
      )
  
imports: import contextlib
  import copy
  import weakref
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.trackable import base
  from tensorflow.python.util import tf_contextlib
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 to create a new CapturableResource object from inherited base classes: base with example: obj = CapturableResource(device)