def make_transformation(self, other, recorder=None):
    transformer = self._get_transformer_to(other)
    if (transformer is None):
        raise Exception(('No transformation from %r to %r' % (self._view_type, other._view_type)))

    def transformation(view):
        view = self.coerce_view(view)
        self.validate(view)
        new_view = transformer(view)
        new_view = other.coerce_view(new_view)
        other.validate(new_view)
        if (transformer is not identity_transformer):
            other.set_user_owned(new_view, False)
        return new_view
    return transformation
def make_transformation(self, other, recorder=None):
    transformer = self._get_transformer_to(other)
    if (transformer is None):
        raise Exception(('No transformation from %r to %r' % (self._view_type, other._view_type)))

    def transformation(view):
        view = self.coerce_view(view)
        self.validate(view)
        new_view = transformer(view)
        new_view = other.coerce_view(new_view)
        other.validate(new_view)
        if (transformer is not identity_transformer):
            other.set_user_owned(new_view, False)
        return new_view
    return transformation