<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lower_unary_transformations(ir_blocks):
 """Raise exception if any unary transformation block encountered."""

    def visitor_fn(expression):
        """Raise error if current expression is a UnaryTransformation."""
        if not isinstance(expression, expressions.UnaryTransformation):
            return expression
        raise NotImplementedError(
            u'UnaryTransformation expression "{}" encountered with IR blocks {} is unsupported by '
            u'the SQL backend.'.format(expression, ir_blocks)
        )

    new_ir_blocks = [
        block.visit_and_update_expressions(visitor_fn)
        for block in ir_blocks
    ]
    return new_ir_blocks