code: def test_consistent_length():
      """Test that a ValueError is raised with a constant sample."""
      msg_error = (
          "The number of timestamps in X must be the same as "
          "the number of timestamps when `fit` was called "
          "({0} != {1}).".format(3, 1)
      )
      mcb = MultipleCoefficientBinning()
      mcb.fit(X, y)
      with pytest.raises(ValueError, match=re.escape(msg_error)):
          mcb.transform(X[:, :1])
  
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 5 for calling a global function with example usage: test_consistent_length() without return types