code: def test_snippets():
      # This test function raises an error if there is a considerable loss of precision
      # that violates the symmetry property of a distance measure.
      m = 10
      k = 3
      s = 3
      seed = 332
      np.random.seed(seed)
      T = np.random.uniform(-1000.0, 1000.0, [64])
  
      isconstant_custom_func = functools.partial(
          naive.isconstant_func_stddev_threshold,
          quantile_threshold=0.05,
      )
      (
          ref_snippets,
          ref_indices,
          ref_profiles,
          ref_fractions,
          ref_areas,
          ref_regimes,
      ) = naive.mpdist_snippets(
          T,
          m,
          k,
          s=s,
          mpdist_T_subseq_isconstant=isconstant_custom_func,
      )
      (
          cmp_snippets,
          cmp_indices,
          cmp_profiles,
          cmp_fractions,
          cmp_areas,
          cmp_regimes,
      ) = stumpy.snippets(
          T,
          m,
          k,
          s=s,
          mpdist_T_subseq_isconstant=isconstant_custom_func,
      )
  
      npt.assert_almost_equal(
          ref_snippets,
          cmp_snippets,
          decimal=config.STUMPY_TEST_PRECISION,
      )
      npt.assert_almost_equal(
          ref_indices, cmp_indices, decimal=config.STUMPY_TEST_PRECISION
      )
      npt.assert_almost_equal(
          ref_profiles,
          cmp_profiles,
          decimal=config.STUMPY_TEST_PRECISION,
      )
      npt.assert_almost_equal(
          ref_fractions,
          cmp_fractions,
          decimal=config.STUMPY_TEST_PRECISION,
      )
      npt.assert_almost_equal(
          ref_areas, cmp_areas, decimal=config.STUMPY_TEST_PRECISION
      )
      npt.assert_almost_equal(ref_regimes, cmp_regimes)
  
file_path: stumpy/tests/test_precision.py
imports: import functools
  from unittest.mock import patch
  import naive
  import numpy
  import numpy.testing
  import pytest
  from numba import cuda
  import stumpy
  from stumpy import config, core
label_desc: Use image node_id 4 for calling a global function with example usage: test_snippets() without return types