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