code: def histogram(X, bins, n_bins, n_samples, n_classes):
      X_new = np.empty((n_samples, (n_bins + 1) * n_classes))
      for i in range(n_samples):
          for j in range(n_classes):
              X_new[i, j * n_bins : (j + 1) * n_bins] = np.histogram(
                  X[i, :, j], bins, (0.0, 1.0)
              )[0]
              X_new[i, -n_classes + j] = np.mean(X[i, :, j])
      return X_new
  
imports: from math import ceil
  from numba import njit
  import numpy
  from sklearn.base import BaseEstimator
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.utils.validation import check_array, check_is_fitted, check_random_state, check_X_y
  from ..base import UnivariateClassifierMixin, UnivariateTransformerMixin
label_desc: Use image node_id 2 for calling a global function with example usage: histogram(X, bins, n_bins, n_samples, n_classes) and returns: X_new