code: def test_calc_end_idx():
      end_idx = scrimp.calc_end_idx(5, 0, 1, 2)
      expecected_idx = 0
  
      assert end_idx == expecected_idx
  
      end_idx = scrimp.calc_end_idx(5, 1, 1, 2)
      expecected_idx = 1
  
      assert end_idx == expecected_idx
  
      end_idx = scrimp.calc_end_idx(5, 2, 1, 2)
      expecected_idx = 2
  
      assert end_idx == expecected_idx
  
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 22 for calling a global function with example usage: test_calc_end_idx() without return types