code: def test_Strides3D(self, mode):
      np_func = dict(add=np.cumsum, mul=np.cumprod)[mode]
      op_class = partial(self.op_class, mode=mode)
      x = T.ftensor3("x")
  
      for axis in [0, 1, 2, None, -1, -2, -3]:
          a = np.random.random((42, 30, 25)).astype("float32")
          cumop_function = theano.function(
              [x], op_class(axis=axis)(x), mode=self.mode
          )
  
          slicings = [
              slice(None, None, None),  # Normal strides
              slice(None, None, 2),  # Stepped strides
              slice(None, None, -1),  # Negative strides
          ]
  
          # Cartesian product of all slicings to test.
          for slicing in product(slicings, repeat=x.ndim):
              f = theano.function(
                  [x], op_class(axis=axis)(x[slicing]), mode=self.mode
              )
              assert [
                  n
                  for n in f.maker.fgraph.toposort()
                  if isinstance(n.op, GpuCumOp)
              ]
              utt.assert_allclose(np_func(a[slicing], axis=axis), f(a))
              utt.assert_allclose(
                  np_func(a[slicing], axis=axis),
                  cumop_function(a[slicing]),
              )
  
imports: from __future__ import absolute_import, print_function, division
  from functools import partial
  from itertools import product
  import numpy
  from six.moves import xrange
  from theano import tensor
  import theano
  import theano.tensor.tests.test_extra_ops
  from theano.tensor.extra_ops import CumOp
  from theano.tests.unittest_tools import SkipTest
  from theano.tests import unittest_tools
  from .config import mode_with_gpu, test_ctx_name
  from ..extra_ops import GpuCumOp
  from ..type import get_context
label_desc: Use image node_id 7 for calling the TestGpuCumOp obj's underlying member method code with example usage: obj.test_Strides3D(mode) without return types