code: def parameterize(*params, _ids=True):
      check_available("parameterize")
      if _ids:
          param_name = cupy.testing._parameterized._make_class_name
      else:
  
          def param_name(_, i, param):
              return str(i)
  
      # TODO(kataoka): Give better names (`id`).
      # For now, use legacy `_make_class_name` just for consistency. Here,
      # a generated name is `TestFoo::test_bar[_param_0_{...}]`, whereas
      # a legacy name is `TestFoo_param_0_{...}::test_bar
      params = [
          pytest.param(param, id=param_name("", i, param))
          for i, param in enumerate(params)
      ]
  
      def f(cls):
          assert not issubclass(cls, unittest.TestCase)
          if issubclass(cls, _TestingParameterizeMixin):
              raise RuntimeError("do not `@testing.parameterize` twice")
          module_name = cls.__module__
          cls = type(cls.__name__, (_TestingParameterizeMixin, cls), {})
          cls.__module__ = module_name
          cls = pytest.mark.parametrize("_cupy_testing_param", params)(
              cls
          )
          return cls
  
      return f
  
imports: import unittest
  import cupy.testing._parameterized
label_desc: Use image node_id 3 for calling a global function with example usage: parameterize() and returns: f, cls, str