code: def pretty_dict(d):
      
      return '{%s}' % ', '.join('%r: %r' % (k, v)
                                for k, v in sorted(d.items(), key=repr))
docs: Return dictionary d's repr but with the items sorted.
      >>> pretty_dict({'m': 'M', 'a': 'A', 'r': 'R', 'k': 'K'})
      "{'a': 'A', 'k': 'K', 'm': 'M', 'r': 'R'}"
      >>> pretty_dict({z: C, y: B, x: A})
      '{x: A, y: B, z: C}'