code: def lower_unary_transformations(ir_blocks):
      
      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
docs: Raise exception if any unary transformation block encountered.