code: def join_grandparent_pruning_select_statement() -> (
      SqlSelectStatementNode
  ):
      """SELECT statement used to build test cases.
  
      In the initial case, all columns are selected from both from_source and joined_source. Test cases will generally
      change the selected columns to see if the sources are pruned appropriately.
  
      -- src4
      SELECT
        col0 AS col0
      FROM src3
      JOIN (
        -- joined_source
        SELECT
          src1.col0 AS col0
          sc1.join_col AS join_col
        FROM (
          SELECT
            src0.col0 AS col0
            , src0.col1 AS col1
            , src0.join_col AS join_col
          FROM src0
        ) src1
      ) src4
      ON
        src3.join_col = src4.join_col
      """
      return SqlSelectStatementNode(
          description="4",
          select_columns=(
              SqlSelectColumn(
                  expr=SqlStringExpression(sql_expr="col0"),
                  column_alias="col0",
              ),
          ),
          from_source=SqlTableFromClauseNode(
              sql_table=SqlTable(
                  schema_name="demo", table_name="from_source_table"
              )
          ),
          from_source_alias="src3",
          joins_descs=(
              SqlJoinDescription(
                  right_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="join_col",
                                  )
                              ),
                              column_alias="join_col",
                          ),
                      ),
                      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="join_col",
                                      )
                                  ),
                                  column_alias="join_col",
                              ),
                          ),
                          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=(),
                  ),
                  right_source_alias="src4",
                  on_condition=SqlComparisonExpression(
                      left_expr=SqlColumnReferenceExpression(
                          col_ref=SqlColumnReference(
                              table_alias="src3", column_name="join_col"
                          )
                      ),
                      comparison=SqlComparison.EQUALS,
                      right_expr=SqlColumnReferenceExpression(
                          col_ref=SqlColumnReference(
                              table_alias="src4", column_name="join_col"
                          )
                      ),
                  ),
                  join_type=SqlJoinType.INNER,
              ),
          ),
          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 14 for calling a global function with example usage: join_grandparent_pruning_select_statement() and returns: SqlSelectStatementNode