code: def flatten_dictionary(a_dict, prefix="", sep="/"):
      flat_dict = {}
      basic_types = (
          float,
          int,
          bool,
          six.string_types,
      )
      for k, v in a_dict.items():
          k = str(k)
          if isinstance(v, (float, int, bool, six.string_types)):
              flat_dict[prefix + k] = v
          elif isinstance(v, (list, tuple)) and all(
              [isinstance(i, basic_types) for i in v]
          ):
              flat_dict[prefix + k] = v
          elif isinstance(v, dict):
              nested_flat_dict = flatten_dictionary(
                  v, prefix=prefix + k + sep, sep=sep
              )
              if nested_flat_dict:
                  flat_dict.update(nested_flat_dict)
              else:
                  flat_dict[k] = {}
          else:
              # this is a mixture of list and dict, or any other object,
              # leave it as is, we have nothing to do with it.
              flat_dict[prefix + k] = v
      return flat_dict
  
imports: import itertools
  import json
  from copy import copy
  from logging import getLogger
  import six
  import yaml
label_desc: Use image node_id 6 for calling a global function with example usage: flatten_dictionary(a_dict, prefix, sep) and returns: flat_dict