code: def _digitize(X, bins):
      n_samples, n_timestamps = X.shape
      if bins.ndim == 1:
          X_binned = _digitize_1d(X, bins, n_samples, n_timestamps)
      else:
          X_binned = _digitize_2d(X, bins, n_samples, n_timestamps)
      return X_binned.astype("int64")
  
imports: import numpy
  from numba import njit, prange
  from numba.typed import List
  from scipy.stats import norm
  from sklearn.base import BaseEstimator
  from sklearn.utils.validation import check_array
  from warnings import warn
  from ..base import UnivariateTransformerMixin
label_desc: Use image node_id 4 for calling a global function with example usage: _digitize(X, bins) and returns: X_binned