code: def repeat(times, intensive_times=None):
      """Decorator that imposes the test to be successful in a row.
  
      Decorated test case is launched multiple times.
      The case is regarded as passed only if it is successful
      specified times in a row.
  
      .. note::
          In current implementation, this decorator grasps the
          failure information of each trial.
  
      Args:
          times(int): The number of trials in casual test.
          intensive_times(int or None): The number of trials in more intensive
              test. If ``None``, the same number as `times` is used.
      """
      if intensive_times is None:
          return repeat_with_success_at_least(times, times)
  
      casual_test = bool(int(os.environ.get("CUPY_TEST_CASUAL", "0")))
      times_ = times if casual_test else intensive_times
      return repeat_with_success_at_least(times_, times_)
  
file_path: cupy/cupy/testing/_condition.py
imports: import functools
  import os
  import unittest
label_desc: Use image node_id 2 for calling a global function with example usage: repeat(times, intensive_times) and returns: repeat_with_success_at_least, repeat_with_success_at_least