code: def test_strided_slice_grad(executor_kind):
      def check(sh, dtype, begin, end, strides, slice_mode):
          x = relay.var("x", shape=sh, dtype=dtype)
          f = relay.Function(
              [x],
              relay.strided_slice(
                  x,
                  begin=begin,
                  end=end,
                  strides=strides,
                  slice_mode=slice_mode,
              ),
          )
          check_grad(f, executor_kind=executor_kind)
  
      check(
          (2, 3, 4),
          "float32",
          (0, 1, 0),
          (-1, -1, 1),
          (1, 1, 1),
          "size",
      )
      check(
          (2, 3, 4), "float32", (0, 1, 0), (2, 3, 1), (1, 1, 1), "end"
      )
      # check that strides are properly ignored when using "size" mode
      check(
          (2, 3, 4),
          "float32",
          (0, 0, 0),
          (-1, -1, -1),
          (1, 1, 2),
          "size",
      )
      check(
          (2, 3, 4), "float32", (0, 0, 0), (2, 3, 4), (1, 1, 2), "end"
      )
  
file_path: tvm/tests/python/relay/test_op_grad_level4.py
imports: import pytest
  import numpy
  import tvm.testing
  from tvm import relay
  from tvm.relay.testing import check_grad, _np_randn_from_type
label_desc: Use image node_id 8 for calling a global function with example usage: test_strided_slice_grad(executor_kind) without return types