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