code: def tree_view(dictionary, level=0, sep="|  "):
      
      return "".join(["{0}{1}\n{2}".format(sep * level, k,
                     tree_view(v, level + 1, sep=sep) if isinstance(v, dict)
                     else "") for k, v in dictionary.items()])
docs: View a dictionary as a tree.