code: def test_calc_curlastz():
      ts = np.array([1, 2, 3, 4, 5, 6, 7, 8])
      m = 4
      n = len(ts)
      profile_len = scrimp.calc_profile_len(n, m)
  
      # test index 2
      idx = 2
      curlastz = np.zeros(profile_len)
      curlastz = scrimp.calc_curlastz(
          ts, m, n, idx, profile_len, curlastz
      )
      expected_result = np.array([0, 0, 50, 82, 122])
  
      np.testing.assert_almost_equal(curlastz, expected_result)
  
      # test index 3
      idx = 3
      curlastz = np.zeros(profile_len)
      curlastz = scrimp.calc_curlastz(
          ts, m, n, idx, profile_len, curlastz
      )
      expected_result = np.array([0, 0, 0, 60, 96])
  
      np.testing.assert_almost_equal(curlastz, expected_result)
  
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 28 for calling a global function with example usage: test_calc_curlastz() without return types