code: def test_prune_from_source(
      request: FixtureRequest,
      mf_test_session_state: MetricFlowTestSessionState,
      column_pruner: SqlColumnPrunerOptimizer,
      base_select_statement: SqlSelectStatementNode,
  ) -> None:
      """Tests a case where columns should be pruned from the FROM clause."""
      select_statement_with_some_from_source_column_removed = (
          SqlSelectStatementNode(
              description="test0",
              select_columns=(
                  SqlSelectColumn(
                      expr=SqlColumnReferenceExpression(
                          col_ref=SqlColumnReference(
                              table_alias="from_source",
                              column_name="col0",
                          )
                      ),
                      column_alias="from_source_col0",
                  ),
                  SqlSelectColumn(
                      expr=SqlColumnReferenceExpression(
                          col_ref=SqlColumnReference(
                              table_alias="joined_source",
                              column_name="col0",
                          )
                      ),
                      column_alias="joined_source_col0",
                  ),
                  SqlSelectColumn(
                      expr=SqlColumnReferenceExpression(
                          col_ref=SqlColumnReference(
                              table_alias="joined_source",
                              column_name="col1",
                          )
                      ),
                      column_alias="joined_source_col1",
                  ),
                  SqlSelectColumn(
                      expr=SqlColumnReferenceExpression(
                          col_ref=SqlColumnReference(
                              table_alias="joined_source",
                              column_name="join_col",
                          )
                      ),
                      column_alias="joined_source_join_col",
                  ),
              ),
              from_source=base_select_statement.from_source,
              from_source_alias=base_select_statement.from_source_alias,
              joins_descs=base_select_statement.join_descs,
              group_bys=base_select_statement.group_bys,
              order_bys=base_select_statement.order_bys,
              where=base_select_statement.where,
          )
      )
  
      assert_default_rendered_sql_equal(
          request=request,
          mf_test_session_state=mf_test_session_state,
          sql_plan_node=select_statement_with_some_from_source_column_removed,
          plan_id="before_pruning",
      )
  
      column_pruned_select_node = column_pruner.optimize(
          select_statement_with_some_from_source_column_removed
      )
      assert_default_rendered_sql_equal(
          request=request,
          mf_test_session_state=mf_test_session_state,
          sql_plan_node=column_pruned_select_node,
          plan_id="after_pruning",
      )
  
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 5 for calling a global function with example usage: test_prune_from_source(request, mf_test_session_state, column_pruner, base_select_statement) without return types