code: def pretty_dict_string(d, indent=0):
      
      s = ''
      for key, value in sorted(d.items()):
          s += '    ' * indent + str(key)
          if isinstance(value, dict):
               s += '\n' + pretty_dict_string(value, indent+1)
          else:
               s += '=' + str(value) + '\n'
      return s
docs: Pretty output of nested dictionaries.