code: def repeat(repeat_count=5):
      """
      Function decorators that repeat function many times.
  
      :param repeat_count: The repeat count
      """
  
      def repeat_decorator(f):
          @functools.wraps(f)
          def wrap(*args, **kwargs):
              last_result = None
              for _ in range(repeat_count):
                  last_result = f(*args, **kwargs)
              return last_result
  
          return wrap
  
      return repeat_decorator
  
file_path: airflow/tests/test_utils/perf/perf_kit/repeat_and_time.py
imports: from __future__ import annotations
  import contextlib
  import functools
  import math
  import random
  import signal
  import time
label_desc: Use image node_id 2 for calling a global function with example usage: repeat(repeat_count) and returns: repeat_decorator, wrap, last_result