code: def test_calc_dotproduct_begin_idx():
      ts = [1, 2, 3, 4, 5, 6, 7, 8]
      m = 4
  
      # test index 0
      idx = 0
      dp = np.array([50, 0, 0, 0, 0])
      beginidx = 0
      idx_nn = 2
      idx_diff = 2
      val = scrimp.calc_dotproduct_begin_idx(
          ts, dp, beginidx, idx, idx_diff, m, idx_nn
      )
      expected_val = np.array([50, 0, 0, 0, 0])
  
      np.testing.assert_almost_equal(val, expected_val)
  
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 26 for calling a global function with example usage: test_calc_dotproduct_begin_idx() without return types