code: def __getattr__(cls, func):
      if func.startswith("__"):
          return super().__getattr__(func)
  
      if not cls._writer_stacks:
  
          def noop(*args, **kwargs):
              return
  
          return noop
  
      writer = cls._writer_stacks[-1]
  
      def call(*args, **kwargs):
          if "global_step" not in kwargs:
              kwargs["global_step"] = cls._global_step
          try:
              return getattr(writer, func)(*args, **kwargs)
          except Exception as e:
              if hasattr(writer, "exceptions_to_ignore") and isinstance(
                  e, writer.exceptions_to_ignore
              ):
                  logger.warning("Ignoring exception: {}".format(e))
                  if hasattr(writer, "exception_logging_func"):
                      writer.exception_logging_func(e)
                  return
              raise
  
      return call
  
file_path: ReAgent/reagent/core/tensorboardX.py
imports: import contextlib
  import logging
  from typing import Any, Dict, List
  from torch.utils.tensorboard import SummaryWriter
label_desc: Use image node_id 1 for calling the SummaryWriterContextMeta obj's underlying member method code with example usage: obj.__getattr__(cls, func) and returns: call, super, noop, getattr