class_docstr: Re-writes the GROUP BY to use a SqlColumnAliasReferenceExpression.
code: def visit_select_statement_node(
      self, node: SqlSelectStatementNode
  ) -> SqlQueryPlanNode:  # noqa: D
      new_group_bys = []
      for group_by in node.group_bys:
          matching_select_column = (
              SqlGroupByRewritingVisitor._find_matching_select(
                  group_by.expr, node.select_columns
              )
          )
          if matching_select_column:
              new_group_bys.append(
                  SqlSelectColumn(
                      expr=SqlColumnAliasReferenceExpression(
                          column_alias=matching_select_column.column_alias
                      ),
                      column_alias=matching_select_column.column_alias,
                  )
              )
          else:
              logger.error(
                  f"Did not find matching select for {group_by} in {node}"
              )
              new_group_bys.append(group_by)
  
      return SqlSelectStatementNode(
          description=node.description,
          select_columns=node.select_columns,
          from_source=node.from_source.accept(self),
          from_source_alias=node.from_source_alias,
          joins_descs=tuple(
              SqlJoinDescription(
                  right_source=x.right_source.accept(self),
                  right_source_alias=x.right_source_alias,
                  on_condition=x.on_condition,
                  join_type=x.join_type,
              )
              for x in node.join_descs
          ),
          group_bys=tuple(new_group_bys),
          order_bys=node.order_bys,
          where=node.where,
          limit=node.limit,
          distinct=node.distinct,
      )
  
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 2 for calling the SqlGroupByRewritingVisitor obj's underlying member method code with example usage: obj.visit_select_statement_node(node) and returns: SqlSelectStatementNode