code: def test_infer_shape(self, mode):
      # GpuCumOp is only defined for float32 for now, so we skip it
      # in the unsupported cases
      op_class = partial(self.op_class, mode=mode)
      gpucumop_supported_dtypes = ("float32",)
      if theano.config.floatX not in gpucumop_supported_dtypes:
          raise SkipTest(
              "Gpucumop not implemented for dtype %s"
              % theano.config.floatX
          )
      x = T.tensor3("x")
      a = np.random.random((3, 5, 2)).astype(theano.config.floatX)
  
      for axis in range(-len(a.shape), len(a.shape)):
          self._compile_and_check(
              [x], [op_class(axis=axis)(x)], [a], GpuCumOp
          )
  
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 3 for calling the TestGpuCumOp obj's underlying member method code with example usage: obj.test_infer_shape(mode) without return types