code: def log(self, level: int, message: str, *args, **kwargs) -> None:
      if self.logger.isEnabledFor(level):
          formatted_message = message % args
          if is_onnx_diagnostics_log_artifact_enabled():
              # Only log to terminal if artifact is enabled.
              # See [NOTE: `dynamo_export` diagnostics logging] for details.
              self.logger.log(level, formatted_message, **kwargs)
  
          self.additional_messages.append(formatted_message)
  
imports: from __future__ import annotations
  import dataclasses
  import functools
  import logging
  from typing import Any, Optional
  import onnxscript
  from onnxscript.function_libs.torch_lib import graph_building
  import torch
  import torch.fx
  from torch.onnx._internal import diagnostics
  from torch.onnx._internal.diagnostics import infra
  from torch.onnx._internal.diagnostics.infra import decorator, formatter
  from torch.onnx._internal.fx import registration, type_utils
label_desc: Use image node_id 1 for calling the Diagnostic obj's underlying member method code with example usage: obj.log(level, message) without return types