code: def grandparent_pruning_select_statement() -> SqlSelectStatementNode:
      """Test case testing pruning of grandparents in a select statement.
  
      The string expression for col0 does not have "used_columns" set, so the pruning path is different from the previous
      case.
  
      -- src2
      SELECT
        col0 AS col0
      FROM (
        -- src1
        SELECT
          src1.col0 AS col0
          , src1.col1 AS col1
        FROM (
          -- from_source1
          SELECT
            src0.col0 AS col0
            , src0.col1 AS col1
            , src0.col2 AS col2
          FROM demo.src0 src0
        ) src1
      ) src2
      """
      return SqlSelectStatementNode(
          description="src2",
          select_columns=(
              SqlSelectColumn(
                  expr=SqlStringExpression(sql_expr="col0"),
                  column_alias="col0",
              ),
          ),
          from_source=SqlSelectStatementNode(
              description="src1",
              select_columns=(
                  SqlSelectColumn(
                      expr=SqlColumnReferenceExpression(
                          col_ref=SqlColumnReference(
                              table_alias="src1",
                              column_name="col0",
                          )
                      ),
                      column_alias="col0",
                  ),
                  SqlSelectColumn(
                      expr=SqlColumnReferenceExpression(
                          col_ref=SqlColumnReference(
                              table_alias="src1",
                              column_name="col1",
                          )
                      ),
                      column_alias="col1",
                  ),
              ),
              from_source=SqlSelectStatementNode(
                  description="src0",
                  select_columns=(
                      SqlSelectColumn(
                          expr=SqlColumnReferenceExpression(
                              col_ref=SqlColumnReference(
                                  table_alias="src0",
                                  column_name="col0",
                              )
                          ),
                          column_alias="col0",
                      ),
                      SqlSelectColumn(
                          expr=SqlColumnReferenceExpression(
                              col_ref=SqlColumnReference(
                                  table_alias="src0",
                                  column_name="col1",
                              )
                          ),
                          column_alias="col1",
                      ),
                      SqlSelectColumn(
                          expr=SqlColumnReferenceExpression(
                              col_ref=SqlColumnReference(
                                  table_alias="src0",
                                  column_name="col2",
                              )
                          ),
                          column_alias="col2",
                      ),
                  ),
                  from_source=SqlTableFromClauseNode(
                      sql_table=SqlTable(
                          schema_name="demo", table_name="src0"
                      )
                  ),
                  from_source_alias="src0",
                  joins_descs=(),
                  group_bys=(),
                  order_bys=(),
              ),
              from_source_alias="src1",
              joins_descs=(),
              group_bys=(),
              order_bys=(),
          ),
          from_source_alias="src2",
          joins_descs=(),
          where=None,
          group_bys=(),
          order_bys=(),
      )
  
imports: from __future__ import annotations
  import pytest
  from _pytest.fixtures import FixtureRequest
  from metricflow.dataflow.sql_table import SqlTable
  from metricflow.sql.optimizer.column_pruner import SqlColumnPrunerOptimizer
  from metricflow.sql.render.sql_plan_renderer import DefaultSqlQueryPlanRenderer, SqlQueryPlanRenderer
  from metricflow.sql.sql_exprs import SqlColumnReference, SqlColumnReferenceExpression, SqlComparison, SqlComparisonExpression, SqlIsNullExpression, SqlStringExpression
  from metricflow.sql.sql_plan import SqlJoinDescription, SqlJoinType, SqlQueryPlanNode, SqlSelectColumn, SqlSelectStatementNode, SqlTableFromClauseNode
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState
  from metricflow.test.sql.compare_sql_plan import assert_default_rendered_sql_equal
label_desc: Use image node_id 12 for calling a global function with example usage: grandparent_pruning_select_statement() and returns: SqlSelectStatementNode