code: def log_plot(cfg: Any, plot: PlotData, type: str) -> None:
      """Logs a given plot
  
      Args:
          cfg: cfg
          plot: plot to log
          type: type of the plot
  
      """
      cfg.logging._logger.log(plot.encoding, type, plot.data)
  
file_path: h2o-llmstudio/llm_studio/src/utils/logging_utils.py
imports: import io
  import json
  import logging
  import os
  import re
  from typing import Any, Optional
  from llm_studio.src.utils.plot_utils import PlotData
label_desc: Use image node_id 3 for calling a global function with example usage: log_plot(cfg, plot, type) without return types