code: def emit(self, record):
      try:
          # adjust alert level
          if record.level >= logging.ERROR:
              level = self.wandb.AlertLevel.ERROR
          elif record.level >= logging.WARNING:
              level = self.wandb.AlertLevel.WARN
          else:
              level = self.wandb.AlertLevel.INFO
  
          self.wandb.alert(
              title=f"Alert from {record.module}:{record.lineno}",
              text=self.format(record),
              level=level,
          )
  
      except Exception:
          self.handleError(record)
  
file_path: flair/flair/trainers/plugins/loggers/wandb.py
imports: import logging
  from typing import Any, Dict
  from flair.trainers.plugins.base import TrainerPlugin
label_desc: Use image node_id 2 for calling the WandbLoggingHandler obj's underlying member method code with example usage: obj.emit(record) without return types