code: def setval(key, val, dict_=None, delim=defaults.DEFAULT_DELIM):
      '''
      Set a value under the dictionary hierarchy identified
      under the key. The target 'foo/bar/baz' returns the
      dictionary hierarchy {'foo': {'bar': {'baz': {}}}}.
  
      .. note::
  
          Currently this doesn't work with integers, i.e.
          cannot build lists dynamically.
          TODO
      '''
      if not dict_:
          dict_ = {}
      prev_hier = dict_
      dict_hier = key.split(delim)
      for each in dict_hier[:-1]:
          if isinstance(each, six.string_type):
              if each not in prev_hier:
                  prev_hier[each] = {}
              prev_hier = prev_hier[each]
          else:
              prev_hier[each] = [{}]
              prev_hier = prev_hier[each]
      prev_hier[dict_hier[-1]] = val
      return dictf setval(key, val, dict_=None, delim=defaults.DEFAULT_DELIM):
      '''
      Set a value under the dictionary hierarchy identified
      under the key. The target 'foo/bar/baz' returns the
      dictionary hierarchy {'foo': {'bar': {'baz': {}}}}.
  
      .. note::
  
          Currently this doesn't work with integers, i.e.
          cannot build lists dynamically.
          TODO
      '''
      if not dict_:
          dict_ = {}
      prev_hier = dict_
      dict_hier = key.split(delim)
      for each in dict_hier[:-1]:
          if isinstance(each, six.string_type):
              if each not in prev_hier:
                  prev_hier[each] = {}
              prev_hier = prev_hier[each]
          else:
              prev_hier[each] = [{}]
              prev_hier = prev_hier[each]
      prev_hier[dict_hier[-1]] = val
      return dict_
docs: Set a value under the dictionary hierarchy identified
      under the key. The target 'foo/bar/baz' returns the
      dictionary hierarchy {'foo': {'bar': {'baz': {}}}}.
  
      .. note::
  
          Currently this doesn't work with integers, i.e.
          cannot build lists dynamically.
          TODO