docs: def deepupdate(original, update, levels=5):
      """Update, like dict.update, but deeper.
  
      Update 'original' from dict/iterable 'update'.
  
      I.e., it recurses on dicts 'levels' times if necessary.
  
      A standard dict.update is levels=0
      """
      if not isinstance(update, dict):
          update = dict(update)
      if not levels > 0:
          original.update(update)
      else:
          for key, val in update.items():
              if isinstance(original.get(key), dict):
                  # might need a force=True to override this
                  if not isinstance(val, dict):
                      raise TypeError("Trying to update dict %s with "
                                      "non-dict %s" % (original[key], val))
                  deepupdate(original[key], val, levels=levels-1)
              else:
                  original.update({key: val})