code: def __exit__(self, exc_type, exc_val, exc_tb):
      self.logger.setLevel(self._previous_log_level)
      return None
  
imports: from __future__ import annotations
  import contextlib
  import dataclasses
  import gzip
  import logging
  from typing import Callable, Generator, Generic, List, Literal, Mapping, Optional, Type, TypeVar
  from torch.onnx._internal.diagnostics import infra
  from torch.onnx._internal.diagnostics.infra import formatter, sarif, utils
  from torch.onnx._internal.diagnostics.infra.sarif import version
label_desc: Use image node_id 2 for calling the DiagnosticContext obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_val, exc_tb) and returns: None