class_docstr: Module level tests for all sktime pairwise panel transformers.
class_docstr_tok: ["Module","level","tests","for","all","sktime","pairwise","panel","transformers","."]
docstr: Test expected output of transform_diag.
docstr_tok: ["Test","expected","output","of","transform_diag","."]
code: def test_transform_diag(self, estimator_instance, scenario):
      """Test expected output of transform_diag."""
      trafo_name = type(estimator_instance).__name__
      diag_vec = scenario.run(
          estimator_instance, method_sequence=["transform_diag"]
      )
  
      len_X = len(scenario.args["transform"]["X"])
  
      assert isinstance(
          diag_vec, np.ndarray
      ), f"Shape of matrix returned by transform is wrong for {trafo_name}"
      assert (
          # this is only true as long as fixture are of mtypes where len = n_instances
          # should that change, use check_is_mtype to get n_instances metadata
          diag_vec.shape
          == (len_X,)
      ), f"Shape of matrix returned by transform is wrong for {trafo_name}"
  
file_path: sktime/sktime/dists_kernels/tests/test_all_dist_kernels.py
imports: import numpy
  from sktime.tests.test_all_estimators import BaseFixtureGenerator, QuickTester
label_desc: Use image node_id 2 for calling the TestAllPanelTransformers obj's underlying member method code with example usage: obj.test_transform_diag(estimator_instance, scenario) without return types