class_docstr: Attributes:
     lineno: the line number on which the error occured
     filename: the file in which the error occured
docstr: This is called when the context closes. If an exception was raised
  `exc_type`, `exc_value` and `tb` will be set.
docstr_tok: ["This","is","called","when","the","context","closes",".","If","an","exception","was","raised","`","exc_type","`",",","`","exc_value","`","and","`","tb","`","will","be","set","."]
code: def __exit__(
      self,
      exc_type: Optional[Type[Exception]],
      exc_value: Optional[Exception],
      tb: Optional[types.TracebackType],
  ) -> bool:
      """This is called when the context closes. If an exception was raised
      `exc_type`, `exc_value` and `tb` will be set.
      """
      if not super().__exit__(exc_type, exc_value, tb):
          return False  # reraise
      # super().__exit__ will throw if exc_type is None
      assert exc_type is not None
      assert exc_value is not None
      assert tb is not None
      frames = _get_tb_lines(tb)
      self.filename, self.lineno, _ = frames[0]
      lines = [line for _, _, line in frames]
      if (
          self._expected_line is not None
          and self._expected_line not in lines
      ):
          # pyre-ignore [16]: ... has no attribute `_raiseFailure`.
          self._raiseFailure(
              f"{self._expected_line!r} was not found in the traceback: {lines!r}"
          )
  
      return True
  
imports: import builtins
  import contextlib
  import io
  import linecache
  import logging
  import signal
  import sys
  import types
  import unittest
  from functools import wraps
  from logging import Logger
  from types import FrameType
  from typing import Any, Callable, ContextManager, Dict, Generator, List, Optional, Tuple, Type, TypeVar, Union
  from unittest.mock import MagicMock
  import yappi
  from ax.utils.common.base import Base
  from ax.utils.common.equality import object_attribute_dicts_find_unequal_fields
  from ax.utils.common.logger import get_logger
  from pyfakefs import fake_filesystem_unittest
label_desc: Use image node_id 2 for calling the _AssertRaisesContextOn obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_value, tb) and returns: True, False