code: def test_expr_rewrite(
      default_expr_renderer: DefaultSqlExpressionRenderer,
  ) -> None:  # noqa: D
      expr = SqlLogicalExpression(
          operator=SqlLogicalOperator.AND,
          args=(
              SqlColumnReferenceExpression(
                  SqlColumnReference("a", "col0")
              ),
              SqlColumnReferenceExpression(
                  SqlColumnReference("a", "col1")
              ),
          ),
      )
  
      column_replacements = SqlColumnReplacements(
          {
              SqlColumnReference("a", "col0"): SqlStringExpression(
                  "foo", requires_parenthesis=False
              ),
              SqlColumnReference("a", "col1"): SqlStringExpression(
                  "bar", requires_parenthesis=False
              ),
          }
      )
      expr_rewritten = expr.rewrite(column_replacements)
      assert (
          default_expr_renderer.render_sql_expr(expr_rewritten).sql
          == "foo AND bar"
      )
  
imports: from __future__ import annotations
  import logging
  import textwrap
  import pytest
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from metricflow.sql.render.expr_renderer import DefaultSqlExpressionRenderer
  from metricflow.sql.sql_exprs import SqlAggregateFunctionExpression, SqlBetweenExpression, SqlCastToTimestampExpression, SqlColumnReference, SqlColumnReferenceExpression, SqlColumnReplacements, SqlComparison, SqlComparisonExpression, SqlDateTruncExpression, SqlExtractExpression, SqlFunction, SqlIsNullExpression, SqlLogicalExpression, SqlLogicalOperator, SqlNullExpression, SqlRatioComputationExpression, SqlStringExpression, SqlStringLiteralExpression, SqlWindowFunction, SqlWindowFunctionExpression, SqlWindowOrderByArgument
label_desc: Use image node_id 17 for calling a global function with example usage: test_expr_rewrite(default_expr_renderer) without return types