code: def _dict_factory(items):
      ret = {}
      for key, value in items:
          if value is not None:
              # NOTE (zhe):
              # It's hard for end users to set a field to missing, so I decided to treat None as "not set".
              # If a field needs explicit "None", use something like magic string.
              k = utils.camel_case(key)
              v = str(value) if isinstance(value, Path) else value
              ret[k] = v
      return ret
  
file_path: nni/nni/experiment/config/base.py
imports: import copy
  import dataclasses
  from pathlib import Path
  import yaml
  from .None import utils
label_desc: Use image node_id 1 for calling a global function with example usage: _dict_factory(items) and returns: ret