code: def repr_dict(_dict, indent):
      
      # pprint represents OrderedDict objects using the tuple init syntax,
      # which is not very readable. Therefore, dictionaries are iterated over.
      if _dict is None:
          return 'None'
      if not isinstance(_dict, Mapping):
          raise TypeError("Object must be a mapping, but is a %s" %
                          type(_dict))
      if isinstance(_dict, OrderedDict):
          kind = 'ordered'
          ret = '%s {\n' % kind  # non standard syntax for the kind indicator
          for key in six.iterkeys(_dict):
              value = _dict[key]
              ret += _indent('%r: %r,\n' % (key, value), 2)
      else:  # dict
          kind = 'sorted'
          ret = '%s {\n' % kind  # non standard syntax for the kind indicator
          for key in sorted(six.iterkeys(_dict)):
              value = _dict[key]
              ret += _indent('%r: %r,\n' % (key, value), 2)
      ret += '}'
      ret = repr_text(ret, indent=indent)
      return ret.lstrip(' ')
docs: Return a debug representation of a dict or OrderedDict.