code: def test_label_categorizer():
      y = np.array([-1, 2, 1, 1, 2])
      lc = tslearn.utils.LabelCategorizer()
      lc.fit(y)
  
      s = pickle.dumps(lc)
      lc2 = pickle.loads(s)
      y_tr = lc2.inverse_transform([[0, 1, 0], [0, 0, 1], [1, 0, 0]])
      ref = np.array([1.0, 2.0, -1.0])
  
      assert_allclose(ref, y_tr)
  
file_path: tslearn/tslearn/tests/test_utils.py
imports: from tempfile import gettempdir
  from os.path import join
  import numpy
  import pickle
  from numpy.testing import assert_allclose
  import pytest
  import tslearn.utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_label_categorizer() without return types