code: def test_flatten():
      """Test the 'flatten' parameter."""
      arr_false = (
          MarkovTransitionField(n_bins=2).transform(X).reshape(2, -1)
      )
      arr_true = MarkovTransitionField(
          n_bins=2, flatten=True
      ).transform(X)
      np.testing.assert_allclose(
          arr_false, arr_true, atol=1e-5, rtol=0.0
      )
  
file_path: pyts/pyts/image/tests/test_mtf.py
imports: import numpy
  import pytest
  import re
  from pyts.image.mtf import _markov_transition_matrix, _markov_transition_field, _aggregated_markov_transition_field
  from pyts.image import MarkovTransitionField
label_desc: Use image node_id 6 for calling a global function with example usage: test_flatten() without return types