code: def __enter__(self):
      self._previous_log_level = self.logger.level
      self.logger.setLevel(self.options.verbosity_level)
      return self
  
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 1 for calling the DiagnosticContext obj's underlying member method code with example usage: obj.__enter__() and returns: self