class_docstr: Visits the SQL query plan to simplify sub-queries. On each visit, return a simplified node.
  
  Unlike SqlSubQueryReducerVisitor, this will re-write expressions to realize more reductions.
code: def _rewrite_where(
      column_replacements: SqlColumnReplacements,
      node_where: Optional[SqlExpressionNode] = None,
      parent_node_where: Optional[SqlExpressionNode] = None,
  ) -> Optional[SqlExpressionNode]:
      if node_where is None and parent_node_where is None:
          return None
      elif node_where and parent_node_where is None:
          return node_where.rewrite(column_replacements)
      elif node_where is None and parent_node_where:
          return parent_node_where
  
      # For type checking. The above conditionals should ensure the below.
      assert node_where
      assert parent_node_where
      return SqlLogicalExpression(
          operator=SqlLogicalOperator.AND,
          args=(node_where, parent_node_where),
      )
  
imports: from __future__ import annotations
  import logging
  from dataclasses import dataclass
  from typing import List, Optional, Sequence, Tuple
  from metricflow.sql.optimizer.sql_query_plan_optimizer import SqlQueryPlanOptimizer
  from metricflow.sql.sql_exprs import SqlColumnAliasReferenceExpression, SqlColumnReference, SqlColumnReplacements, SqlExpressionNode, SqlExpressionTreeLineage, SqlLogicalExpression, SqlLogicalOperator
  from metricflow.sql.sql_plan import SqlJoinDescription, SqlOrderByDescription, SqlQueryPlanNode, SqlQueryPlanNodeVisitor, SqlSelectColumn, SqlSelectQueryFromClauseNode, SqlSelectStatementNode, SqlTableFromClauseNode
label_desc: Use image node_id 11 for calling the SqlRewritingSubQueryReducerVisitor obj's underlying member method code with example usage: obj._rewrite_where(column_replacements, node_where, parent_node_where) and returns: SqlLogicalExpression, None, node_where, parent_node_where