code: def test_can_use_accelerator_set_unset(self):
      # ensure we use CUB block reduction and not CUB device reduction
      old_routine_accelerators = _accelerator.get_routine_accelerators()
      _accelerator.set_routine_accelerators([])
  
      a = cupy.random.random((10, 10))
      # this is the only function we can mock; the rest is cdef'd
      func_name = "".join(
          (
              "cupy._core._cub_reduction.",
              "_SimpleCubReductionKernel_get_cached_function",
          )
      )
      func = (
          _cub_reduction._SimpleCubReductionKernel_get_cached_function
      )
      with testing.AssertFunctionIsCalled(
          func_name, wraps=func, times_called=2
      ):  # two passes
          a.sum()
      with testing.AssertFunctionIsCalled(
          func_name, wraps=func, times_called=1
      ):  # one pass
          a.sum(axis=1)
      with testing.AssertFunctionIsCalled(
          func_name, wraps=func, times_called=0
      ):  # not used
          a.sum(axis=0)
  
      _accelerator.set_routine_accelerators(old_routine_accelerators)
  
imports: from itertools import combinations
  import unittest
  import sys
  import cupy
  from cupy import _environment
  from cupy import testing
  from cupy._core import _accelerator
  from cupy._core import _cub_reduction
  from cupy.cuda import memory
label_desc: Use image node_id 9 for calling the TestSimpleCubReductionKernelMisc obj's underlying member method code with example usage: obj.test_can_use_accelerator_set_unset() without return types