code: def test_basic(self):
      t = constant_op.constant([1, 2, 3])  # creates a hidden context
      self.assertTrue(isinstance(t, ops.EagerTensor))
      t = _pywrap_tf2.is_enabled()
      self.assertTrue(t)
      v2_compat.disable_v2_behavior()
      t = constant_op.constant([1, 2, 3])
      self.assertFalse(isinstance(t, ops.EagerTensor))
      t = _pywrap_tf2.is_enabled()
      self.assertFalse(t)
  
file_path: tensorflow-upstream/tensorflow/python/compat/disable_v2_behavior_test.py
imports: from tensorflow.python.compat import v2_compat
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import _pywrap_tf2
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the DisableV2BehaviorTest obj's underlying member method code with example usage: obj.test_basic() without return types