code: def test_transformer(binning_method):
      """Test SFA transformer expected output."""
      # load training data
      X, y = load_gunpoint(split="train", return_X_y=True)
  
      word_length = 6
      alphabet_size = 4
  
      p = SFA(
          word_length=word_length,
          alphabet_size=alphabet_size,
          binning_method=binning_method,
      )
      p.fit(X, y)
  
      assert p.breakpoints.shape == (word_length, alphabet_size)
      i = (
          sys.float_info.max
          if binning_method == "information-gain"
          else 0
      )
      assert np.equal(
          i, p.breakpoints[1, :-1]
      ).all()  # imag component is 0 or inf
      _ = p.transform(X, y)
  
file_path: sktime/sktime/transformations/panel/dictionary_based/tests/test_sfa.py
imports: import sys
  import numpy
  import pytest
  from sktime.datasets import load_gunpoint
  from sktime.datatypes._panel._convert import from_nested_to_2d_array
  from sktime.tests.test_switch import run_test_for_class
  from sktime.transformations.panel.dictionary_based._sfa import SFA
label_desc: Use image node_id 1 for calling a global function with example usage: test_transformer(binning_method) without return types