code: def test_getitem():
      x = C.input_variable(5)
      y = x + 0
      f = y[3]
      r = f.eval([np.array([[1, 2, 3, 4, 5]])])
      assert np.allclose(r, [[[4]]])
      f = y[2:4:1]
      r = f.eval([np.array([[1, 2, 3, 4, 5]])])
      assert np.allclose(r, [[[3, 4]]])
      f = y[2::]
      r = f.eval([np.array([[1, 2, 3, 4, 5]])])
      assert np.allclose(r, [[[3, 4, 5]]])
      f = y[:3]
      r = f.eval([np.array([[1, 2, 3, 4, 5]])])
      assert np.allclose(r, [[[1, 2, 3]]])
      f = y[1:4:2]
      r = f.eval([np.array([[1, 2, 3, 4, 5]])])
      assert np.allclose(r, [[[2, 4]]])
  
file_path: CNTK/bindings/python/cntk/tests/variables_test.py
imports: from ..None import times, placeholder, constant, plus, alias, initializer
  import numpy
  import cntk
  import pytest
label_desc: Use image node_id 10 for calling a global function with example usage: test_getitem() without return types