code: def testLifeCycle(self):
      self.assertFalse(self.obj.deleted)
  
      a = c_api_util.UniquePtr(
          name="mock", deleter=self.deleter, obj=self.obj
      )
  
      with a.get() as obj:
          self.assertIs(obj, self.obj)
  
      del a
      gc.collect()
      self.assertTrue(self.obj.deleted)
  
file_path: tensorflow-upstream/tensorflow/python/framework/c_api_util_test.py
imports: import gc
  from tensorflow.python.framework import c_api_util
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 2 for calling the UniquePtrTest obj's underlying member method code with example usage: obj.testLifeCycle() without return types