code: def _get_dict(d):
      if isinstance(d, dict):
          return d
      # assume argparse Namespace
      return vars(d)
  
imports: import abc
  import typing
  from .interface.summary_record import SummaryItem, SummaryRecord
label_desc: Use image node_id 1 for calling a global function with example usage: _get_dict(d) and returns: vars, d