code: def test_fast_find_nn_pre():
      """Validate the computations for fast find nn pre."""
      ts = np.array([1, 2, 3, 4, 5, 6, 7, 8])
      m = 4
  
      (
          X,
          n,
          sumx2,
          sumx,
          meanx,
          sigmax2,
          sigmax,
      ) = scrimp.fast_find_nn_pre(ts, m)
      assert n == 8
  
      expected_sumx2 = np.array([30, 54, 86, 126, 174])
      assert ((sumx2 == expected_sumx2)).all()
  
      expected_sumx = np.array([10, 14, 18, 22, 26])
      assert ((sumx == expected_sumx)).all()
  
      expected_meanx = np.array([2.5, 3.5, 4.5, 5.5, 6.5])
      assert (meanx == expected_meanx).all()
  
      expected_sigmax2 = np.array([1.25, 1.25, 1.25, 1.25, 1.25])
      assert np.allclose(sigmax2, expected_sigmax2)
  
      expected_sigmax = np.array([1.118, 1.118, 1.118, 1.118, 1.118])
      assert np.allclose(sigmax, expected_sigmax, 1e-02)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import pytest
  import numpy
  import matrixprofile
  from matrixprofile import scrimp
label_desc: Use image node_id 1 for calling a global function with example usage: test_fast_find_nn_pre() without return types