code: def __enter__(self):
      self.log.append("__enter__()")
      if self.behavior == "raise_from_enter":
          raise ValueError("exception in __enter__")
      return "var"
  
file_path: tensorflow/tensorflow/python/framework/py_context_manager_test.py
imports: from tensorflow.python.framework import _py_context_manager
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 2 for calling the TestContextManager obj's underlying member method code with example usage: obj.__enter__() and returns: str