code: def as_ordereddict(self):
          
          if six.PY2:
              d = OrderedDict()
              copied = dict(self)
              for key in self:
                  d[key] = copied[key]
          else:
              d = OrderedDict(self)
          return d
docs: Convenience method to convert this object into an OrderedDict