code: def pretty(self):
          "sort values and format output for viewing and comparing in test scenarios"
          pretty_obj = OrderedDict()
          for key, value in sorted(iteritems(self.__dict__)):
              if value is None:
                  pretty_obj[key] = None
              elif is_str_or_unicode(value):
                  pretty_obj[key] = self.__dict__.get(key)
              elif isinstance(value, list):
                  pretty_obj[key] = []
              elif isinstance(value, dict):
                  pretty_obj[key] = {}
              else:
                  pretty_obj[key] = unicode_value(value)
          return pretty_obf pretty(self):
          "sort values and format output for viewing and comparing in test scenarios"
          pretty_obj = OrderedDict()
          for key, value in sorted(iteritems(self.__dict__)):
              if value is None:
                  pretty_obj[key] = None
              elif is_str_or_unicode(value):
                  pretty_obj[key] = self.__dict__.get(key)
              elif isinstance(value, list):
                  pretty_obj[key] = []
              elif isinstance(value, dict):
                  pretty_obj[key] = {}
              else:
                  pretty_obj[key] = unicode_value(value)
          return pretty_obj
docs: sort values and format output for viewing and comparing in test scenarios