code: def log(
      self,
      subset: str,
      name: str,
      value: Any,
      step: Optional[int] = None,
  ):
      if subset in PLOT_ENCODINGS:
          with SqliteDict(self.logs) as logs:
              if subset not in logs:
                  subset_dict = dict()
              else:
                  subset_dict = logs[subset]
              subset_dict[name] = value
              logs[subset] = subset_dict
              logs.commit()
          return
  
      # https://github.com/h2oai/wave/issues/447
      if np.isnan(value):
          value = None
      else:
          value = float(value)
      with SqliteDict(self.logs) as logs:
          if subset not in logs:
              subset_dict = dict()
          else:
              subset_dict = logs[subset]
          if name not in subset_dict:
              subset_dict[name] = {"steps": [], "values": []}
  
          subset_dict[name]["steps"].append(step)
          subset_dict[name]["values"].append(value)
  
          logs[subset] = subset_dict
          logs.commit()
  
imports: import dataclasses
  import logging
  import os
  from typing import Any, Dict, List, Optional
  import numpy
  from sqlitedict import SqliteDict
  from llm_studio.src.utils.plot_utils import PLOT_ENCODINGS
label_desc: Use image node_id 2 for calling the LocalLogger obj's underlying member method code with example usage: obj.log(subset, name, value, step) without return types