code: def test_slice_forward_special(
      seed, inshape, start, stop, step, ctx, fname
  ):
      x_data = np.random.rand(*inshape)
      # Numpy
      s = [
          slice(start[axis], stop[axis], step[axis])
          for axis in range(len(start))
      ]
      x_data_key = ref_slice(x_data, start, stop, step)
  
      # NNabla
      with nn.context_scope(ctx):
          x = nn.Variable.from_numpy_array(x_data)
          x_key = F.slice(x, start, stop, step)
          x_key.forward()
  
      assert_allclose(x_data_key, x_key.d)
  
file_path: nnabla/python/test/function/test_slice.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nbla_test_utils import list_context, function_tester
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 3 for calling a global function with example usage: test_slice_forward_special(seed, inshape, start, stop, step, ctx, fname) without return types