code: def test_migrate_pivot_table() -> None:
      """
      Test the ``migrate_chart`` command when importing an old pivot table.
      """
      chart_config = {
          "slice_name": "Pivot Table",
          "description": None,
          "certified_by": None,
          "certification_details": None,
          "viz_type": "pivot_table",
          "params": json.dumps(
              {
                  "columns": ["state"],
                  "compare_lag": "10",
                  "compare_suffix": "o10Y",
                  "granularity_sqla": "ds",
                  "groupby": ["name"],
                  "limit": "25",
                  "markup_type": "markdown",
                  "metrics": [
                      {
                          "aggregate": "SUM",
                          "column": {
                              "column_name": "num",
                              "type": "BIGINT",
                          },
                          "expressionType": "SIMPLE",
                          "label": "Births",
                          "optionName": "metric_11",
                      },
                  ],
                  "row_limit": 50000,
                  "since": "100 years ago",
                  "time_range": "No filter",
                  "time_range_endpoints": ["inclusive", "exclusive"],
                  "until": "now",
                  "viz_type": "pivot_table",
              },
          ),
          "cache_timeout": None,
          "uuid": "ffd15af2-2188-425c-b6b4-df28aac45872",
          "version": "1.0.0",
          "dataset_uuid": "a18b9cb0-b8d3-42ed-bd33-0f0fadbf0f6d",
      }
  
      new_config = migrate_chart(chart_config)
      assert new_config == {
          "slice_name": "Pivot Table",
          "description": None,
          "certified_by": None,
          "certification_details": None,
          "viz_type": "pivot_table_v2",
          "params": json.dumps(
              {
                  "groupbyColumns": ["state"],
                  "compare_lag": "10",
                  "compare_suffix": "o10Y",
                  "groupbyRows": ["name"],
                  "limit": "25",
                  "markup_type": "markdown",
                  "metrics": [
                      {
                          "aggregate": "SUM",
                          "column": {
                              "column_name": "num",
                              "type": "BIGINT",
                          },
                          "expressionType": "SIMPLE",
                          "label": "Births",
                          "optionName": "metric_11",
                      }
                  ],
                  "series_limit": 50000,
                  "since": "100 years ago",
                  "time_range_endpoints": ["inclusive", "exclusive"],
                  "until": "now",
                  "viz_type": "pivot_table_v2",
                  "rowOrder": "value_z_to_a",
                  "adhoc_filters": [
                      {
                          "clause": "WHERE",
                          "subject": "ds",
                          "operator": "TEMPORAL_RANGE",
                          "comparator": "No filter",
                          "expressionType": "SIMPLE",
                      }
                  ],
              }
          ),
          "cache_timeout": None,
          "uuid": "ffd15af2-2188-425c-b6b4-df28aac45872",
          "version": "1.0.0",
          "dataset_uuid": "a18b9cb0-b8d3-42ed-bd33-0f0fadbf0f6d",
      }
  
imports: import json
  from superset.commands.chart.importers.v1.utils import migrate_chart
label_desc: Use image node_id 2 for calling a global function with example usage: test_migrate_pivot_table() without return types