class_docstr: This class tests if optuna is in effect for create_reduction_func()
class_docstr_tok: ["This","class","tests","if","optuna","is","in","effect","for","create_reduction_func","(",")"]
code: def setUp(self):
      cupy._core._optimize_config._clear_all_contexts_cache()
      self.old_reductions = _accelerator.get_reduction_accelerators()
      _accelerator.set_reduction_accelerators(self.backend)
  
      # avoid shadowed by the cub module
      self.old_routines = _accelerator.get_routine_accelerators()
      _accelerator.set_routine_accelerators([])
  
      self.x = testing.shaped_arange((3, 4), cupy, dtype=cupy.float32)
  
imports: import os
  import tempfile
  import unittest
  from unittest import mock
  import pytest
  import cupy
  from cupy import testing
  from cupy._core import _accelerator
label_desc: Use image node_id 1 for calling the TestOptimizeBackends obj's underlying member method code with example usage: obj.setUp() without return types