code: def get_cfg(cfg: Any) -> Dict:
      """Returns simplified config elements
  
      Args:
          cfg: configuration
  
      Returns:
          Dict of config elements
      """
  
      items: Dict = {}
      type_annotations = cfg.get_annotations()
  
      cfg_dict = cfg.__dict__
  
      cfg_dict = {
          key: cfg_dict[key]
          for key in cfg._get_order(warn_if_unset=False)
      }
  
      for k, v in cfg_dict.items():
          if k.startswith("_") or cfg._get_visibility(k) < 0:
              continue
  
          if any([x in k for x in ["api"]]):
              continue
  
          if dataclasses.is_dataclass(v):
              elements_group = get_cfg(cfg=v)
              t = elements_group
              items = {**items, **t}
          else:
              type_annotation = type_annotations[k]
              if type_annotation == float:
                  items[k] = float(v)
              else:
                  items[k] = v
  
      return items
  
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 1 for calling a global function with example usage: get_cfg(cfg) and returns: items