code: def test_paa():
      unfitted_paa = PiecewiseAggregateApproximation(n_segments=3)
      data = [
          [-1.0, 2.0, 0.1, -1.0, 1.0, -1.0],
          [1.0, 3.2, -1.0, -3.0, 1.0, -1.0],
      ]
      np.testing.assert_raises(
          NotFittedError, unfitted_paa.distance, data[0], data[1]
      )
  
      paa_est = unfitted_paa
      n, sz, d = 2, 10, 3
      rng = np.random.RandomState(0)
      X = rng.randn(n, sz, d)
      paa_repr = paa_est.fit_transform(X)
      np.testing.assert_allclose(
          paa_est.distance(X[0], X[1]),
          paa_est.distance_paa(paa_repr[0], paa_repr[1]),
      )
  
file_path: tslearn/tslearn/tests/test_piecewise.py
imports: import numpy
  from tslearn.piecewise import OneD_SymbolicAggregateApproximation, SymbolicAggregateApproximation, PiecewiseAggregateApproximation
  from tslearn.neighbors import KNeighborsTimeSeriesClassifier
  from sklearn.exceptions import NotFittedError
  from sklearn.base import clone
label_desc: Use image node_id 1 for calling a global function with example usage: test_paa() without return types