class_docstr: Re-writes the GROUP BY to use a SqlColumnAliasReferenceExpression.
docstr: Given an expression, find the SELECT column that has the same expression.
code: def _find_matching_select(
      expr: SqlExpressionNode, select_columns: Sequence[SqlSelectColumn]
  ) -> Optional[SqlSelectColumn]:
      """Given an expression, find the SELECT column that has the same expression."""
      for select_column in select_columns:
          if select_column.expr == expr:
              return select_column
      return None
  
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 1 for calling the SqlGroupByRewritingVisitor obj's underlying member method code with example usage: obj._find_matching_select(expr, select_columns) and returns: None, select_column