code: def test_cum_after_pivot_with_multiple_metrics():
      pivot_df = pp.pivot(
          df=multiple_metrics_df,
          index=["dttm"],
          columns=["country"],
          aggregates={
              "sum_metric": {"operator": "sum"},
              "count_metric": {"operator": "sum"},
          },
      )
      """
                     count_metric    sum_metric
      country              UK US         UK US
      dttm
      2019-01-01            1  2          5  6
      2019-01-02            3  4          7  8
      """
      cum_df = pp.cum(
          df=pivot_df,
          operator="sum",
          columns={
              "sum_metric": "sum_metric",
              "count_metric": "count_metric",
          },
      )
      """
                 count_metric    sum_metric
      country              UK US         UK  US
      dttm
      2019-01-01            1  2          5   6
      2019-01-02            4  6         12  14
      """
      flat_df = pp.flatten(cum_df)
      """
              dttm  count_metric, UK  count_metric, US  sum_metric, UK  sum_metric, US
      0 2019-01-01                 1                 2               5               6
      1 2019-01-02                 4                 6              12              14
      """
      assert flat_df.equals(
          pd.DataFrame(
              {
                  "dttm": pd.to_datetime(["2019-01-01", "2019-01-02"]),
                  FLAT_COLUMN_SEPARATOR.join(["count_metric", "UK"]): [
                      1,
                      4,
                  ],
                  FLAT_COLUMN_SEPARATOR.join(["count_metric", "US"]): [
                      2,
                      6,
                  ],
                  FLAT_COLUMN_SEPARATOR.join(["sum_metric", "UK"]): [
                      5,
                      12,
                  ],
                  FLAT_COLUMN_SEPARATOR.join(["sum_metric", "US"]): [
                      6,
                      14,
                  ],
              }
          )
      )
  
file_path: superset/tests/unit_tests/pandas_postprocessing/test_cum.py
imports: import pandas
  import pytest
  from superset.exceptions import InvalidPostProcessingError
  from superset.utils import pandas_postprocessing
  from superset.utils.pandas_postprocessing.utils import FLAT_COLUMN_SEPARATOR
  from tests.unit_tests.fixtures.dataframes import multiple_metrics_df, single_metric_df, timeseries_df, timeseries_with_gap_df
  from tests.unit_tests.pandas_postprocessing.utils import series_to_list
label_desc: Use image node_id 5 for calling a global function with example usage: test_cum_after_pivot_with_multiple_metrics() without return types