code: def lower_unsupported_metafield_expressions(ir_blocks):
      
      def visitor_fn(expression):
          """Visitor function raising exception for any unsupported metafield."""
          if not isinstance(expression, expressions.LocalField):
              return expression
          if expression.field_name not in constants.UNSUPPORTED_META_FIELDS:
              return expression
          raise NotImplementedError(
              u'Encountered unsupported metafield {} in LocalField {} during construction of '
              u'SQL query tree for IR blocks {}.'.format(
                  constants.UNSUPPORTED_META_FIELDS[expression.field_name], 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 an unsupported metafield is encountered in any LocalField expression.