code: def test_digitize(X, bins, arr_desired):
      """Test that the actual results are the expected ones."""
      X = np.asarray(X)
      bins = np.asarray(bins)
      arr_actual = _digitize(X, bins)
      np.testing.assert_allclose(
          arr_actual, arr_desired, atol=1e-5, rtol=0.0
      )
  
file_path: pyts/pyts/approximation/tests/test_mcb.py
imports: import numpy
  import pytest
  import re
  from pyts.approximation.mcb import _uniform_bins, _digitize
  from pyts.approximation import MultipleCoefficientBinning
label_desc: Use image node_id 2 for calling a global function with example usage: test_digitize(X, bins, arr_desired) without return types