code: def _paa_to_symbols(X_paa, breakpoints):
      """Transforms a Piecewise Aggregate Approximation representation into a
      SAX one given breakpoints.
  
      Examples
      --------
      >>> _paa_to_symbols(X_paa=numpy.array([-1., 0.1, 2.]),
      ...                 breakpoints=numpy.array([0.]))
      array([0, 1, 1])
      """
      alphabet_size = breakpoints.shape[0] + 1
      X_symbols = numpy.zeros(X_paa.shape, dtype=int) - 1
      for idx_bp, bp in enumerate(breakpoints):
          indices = numpy.logical_and(X_symbols < 0, X_paa < bp)
          X_symbols[indices] = idx_bp
      X_symbols[X_symbols < 0] = alphabet_size - 1
      return X_symbols
  
imports: import numpy
  from scipy.stats import norm
  from sklearn.base import TransformerMixin
  from sklearn.utils.validation import check_is_fitted, check_array
  from tslearn.bases import BaseModelPackage, TimeSeriesBaseEstimator
  from tslearn.metrics.cysax import cydist_sax, cyslopes, cydist_1d_sax, inv_transform_1d_sax, inv_transform_sax, inv_transform_paa
  from tslearn.utils import ts_size, check_dims
label_desc: Use image node_id 1 for calling a global function with example usage: _paa_to_symbols(X_paa, breakpoints) and returns: X_symbols