code: def test_summary_transformer_output_type(
      y, summary_arg, quantile_arg
  ):
      """Test whether output is DataFrame of correct dimensions."""
      transformer = SummaryTransformer(
          summary_function=summary_arg, quantiles=quantile_arg
      )
      transformer.fit(y)
      yt = transformer.transform(y)
  
      output_is_dataframe = isinstance(yt, pd.DataFrame)
      assert output_is_dataframe
  
      # compute number of expected rows and columns
  
      # all test cases are single series, so single row
      expected_instances = 1
  
      # expected number of feature types = quantiles plus summaries
      expected_sum_features = (
          1 if isinstance(summary_arg, str) else len(summary_arg)
      )
      if quantile_arg is None:
          expected_q_features = 0
      elif isinstance(quantile_arg, (int, float)):
          expected_q_features = 1
      else:
          expected_q_features = len(quantile_arg)
      expected_features = expected_sum_features + expected_q_features
  
      # for multivariate series, columns = no variables * no feature types
      if isinstance(y, pd.DataFrame):
          expected_features = len(y.columns) * expected_features
  
      assert yt.shape == (expected_instances, expected_features)
  
file_path: sktime/sktime/transformations/series/tests/test_summarize.py
imports: import re
  import numpy
  import pandas
  import pytest
  from sktime.transformations.series.summarize import ALLOWED_SUM_FUNCS, SummaryTransformer
  from sktime.utils._testing.series import _make_series
label_desc: Use image node_id 1 for calling a global function with example usage: test_summary_transformer_output_type(y, summary_arg, quantile_arg) without return types