code: def test_match_isconstant(Q, T):
      m = Q.shape[0]
      excl_zone = int(np.ceil(m / 4))
      max_distance = 0.3
  
      T_subseq_isconstant = functools.partial(
          naive.isconstant_func_stddev_threshold,
          quantile_threshold=0.05,
      )
  
      left = naive_match(
          Q,
          T,
          excl_zone,
          max_distance=max_distance,
          T_subseq_isconstant=T_subseq_isconstant,
      )
  
      right = match(
          Q,
          T,
          max_matches=None,
          max_distance=lambda D: max_distance,  # also test lambda functionality
          T_subseq_isconstant=T_subseq_isconstant,
      )
  
      npt.assert_almost_equal(left, right)
  
      # Test for when Q is constant
      Q_subseq_isconstant = np.array([True])
  
      left = naive_match(
          Q,
          T,
          excl_zone,
          max_distance=max_distance,
          T_subseq_isconstant=T_subseq_isconstant,
          Q_subseq_isconstant=Q_subseq_isconstant,
      )
  
      right = match(
          Q,
          T,
          max_matches=None,
          max_distance=lambda D: max_distance,  # also test lambda functionality
          T_subseq_isconstant=T_subseq_isconstant,
          Q_subseq_isconstant=Q_subseq_isconstant,
      )
  
      npt.assert_almost_equal(left, right)
  
imports: import functools
  import naive
  import numpy
  import numpy.testing
  import pytest
  from stumpy import core, match, motifs
label_desc: Use image node_id 11 for calling a global function with example usage: test_match_isconstant(Q, T) without return types