code: def test_cumulative_metric_with_non_adjustable_filter(
      request: FixtureRequest,
      mf_test_session_state: MetricFlowTestSessionState,
      sql_client: SqlClient,
      it_helpers: IntegrationTestHelpers,
  ) -> None:
      """Tests a cumulative metric with a filter that cannot be adjusted to ensure all data is included."""
      # Handle ds expression based on engine to support Trino.
      first_ds_expr = f"CAST('2020-03-15' AS {sql_client.sql_query_plan_renderer.expr_renderer.timestamp_data_type})"
      second_ds_expr = f"CAST('2020-04-30' AS {sql_client.sql_query_plan_renderer.expr_renderer.timestamp_data_type})"
      where_constraint = f"{{{{ TimeDimension('metric_time', 'day') }}}} = {first_ds_expr} or"
      where_constraint += f" {{{{ TimeDimension('metric_time', 'day') }}}} = {second_ds_expr}"
  
      query_result = it_helpers.mf_engine.query(
          MetricFlowQueryRequest.create_with_random_request_id(
              metric_names=["trailing_2_months_revenue"],
              group_by_names=["metric_time"],
              order_by_names=["metric_time"],
              where_constraint=where_constraint,
              time_constraint_end=as_datetime("2020-12-31"),
          )
      )
      assert (
          query_result.result_df is not None
      ), "Unexpected empty result."
  
      assert_object_snapshot_equal(
          request=request,
          mf_test_session_state=mf_test_session_state,
          obj_id="query_output",
          obj=query_result.result_df.to_string(),
          sql_client=sql_client,
      )
  
file_path: metricflow/metricflow/test/integration/query_output/test_cumulative_metrics.py
imports: from __future__ import annotations
  import datetime
  import pytest
  from _pytest.fixtures import FixtureRequest
  from dbt_semantic_interfaces.test_utils import as_datetime
  from metricflow.engine.metricflow_engine import MetricFlowQueryRequest
  from metricflow.protocols.sql_client import SqlClient
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState
  from metricflow.test.integration.conftest import IntegrationTestHelpers
  from metricflow.test.snapshot_utils import assert_object_snapshot_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_cumulative_metric_with_non_adjustable_filter(request, mf_test_session_state, sql_client, it_helpers) without return types