code: def test_reduce_all_join_sources(
      request: FixtureRequest,
      mf_test_session_state: MetricFlowTestSessionState,
      reduce_all_join_select_statement: SqlSelectStatementNode,
  ) -> None:
      """Tests a case where reducing occurs all all sources on a JOIN."""
      assert_default_rendered_sql_equal(
          request=request,
          mf_test_session_state=mf_test_session_state,
          sql_plan_node=reduce_all_join_select_statement,
          plan_id="before_reducing",
      )
  
      sub_query_reducer = SqlRewritingSubQueryReducer()
  
      assert_default_rendered_sql_equal(
          request=request,
          mf_test_session_state=mf_test_session_state,
          sql_plan_node=sub_query_reducer.optimize(
              reduce_all_join_select_statement
          ),
          plan_id="after_reducing",
      )
  
imports: from __future__ import annotations
  import pytest
  from _pytest.fixtures import FixtureRequest
  from metricflow.dataflow.sql_table import SqlTable
  from metricflow.sql.optimizer.rewriting_sub_query_reducer import SqlRewritingSubQueryReducer
  from metricflow.sql.sql_exprs import SqlAggregateFunctionExpression, SqlColumnReference, SqlColumnReferenceExpression, SqlComparison, SqlComparisonExpression, SqlFunction, SqlStringExpression, SqlStringLiteralExpression
  from metricflow.sql.sql_plan import SqlJoinDescription, SqlJoinType, SqlOrderByDescription, 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 8 for calling a global function with example usage: test_reduce_all_join_sources(request, mf_test_session_state, reduce_all_join_select_statement) without return types