code: def test_raf_plot_transform_matrix(data):
      """Tests plot_transform_matrix"""
      forecasts = data["forecasts"]
      actuals = data["actuals"]
      levels = data["levels"]
  
      raf = ReconcileAdditiveForecasts()
  
      with pytest.raises(
          NotFittedError, match="Must call `fit` first."
      ):
          raf.plot_transform_matrix()
  
      raf.fit(forecasts=forecasts, actuals=actuals, levels=levels)
      fig = raf.plot_transform_matrix()
      assert_equal(fig.data[0].x, list(raf.forecasts.columns))
      assert_equal(fig.data[0].y, list(raf.forecasts.columns))
      assert_equal(fig.data[0].z, raf.transform_matrix)
      assert fig.layout.coloraxis.cmax == 1.5
      assert fig.layout.coloraxis.cmin == -1.5
      assert fig.layout.xaxis.type == "category"
      assert fig.layout.yaxis.type == "category"
  
      # tests customization
      fig2 = raf.plot_transform_matrix(
          color_continuous_scale="BrBG",
          zmin=-1,
          zmax=1,
          height=400,
          width=500,
      )
      assert fig2.layout.coloraxis.cmax == 1
      assert fig2.layout.coloraxis.cmin == -1
      assert fig2.layout.height == 400
      assert fig2.layout.width == 500
      assert (
          fig2.layout.coloraxis.colorscale
          != fig.layout.coloraxis.colorscale
      )
  
imports: import math
  import os
  import warnings
  import cvxpy
  import numpy
  import pandas
  import pytest
  from scipy.linalg import sqrtm
  from sklearn.exceptions import NotFittedError
  from greykite.algo.reconcile.convex.reconcile_forecasts import ReconcileAdditiveForecasts
  from greykite.algo.reconcile.convex.reconcile_forecasts import TraceInfo
  from greykite.algo.reconcile.convex.reconcile_forecasts import apply_method_defaults
  from greykite.algo.reconcile.convex.reconcile_forecasts import evaluation_plot
  from greykite.algo.reconcile.convex.reconcile_forecasts import get_fit_params
  from greykite.algo.reconcile.convex.reconcile_forecasts import get_weight_matrix
  from greykite.algo.reconcile.hierarchical_relationship import HierarchicalRelationship
  from greykite.common.constants import TIME_COL
  from greykite.common.data_loader import DataLoader
  from greykite.common.evaluation import mean_absolute_percent_error
  from greykite.common.evaluation import median_absolute_percent_error
  from greykite.common.evaluation import root_mean_squared_error
  from greykite.common.python_utils import assert_equal
  from greykite.common.python_utils import reorder_columns
label_desc: Use image node_id 14 for calling a global function with example usage: test_raf_plot_transform_matrix(data) without return types