def METHOD_NAME(self):
    """Return a copy of this object."""
    # This way of initializing the copy means it works for subclasses, too.
    obj = self.__class__(self)
    obj.keyOrder = self.keyOrder[:]
    return obj