def METHOD_NAME(func, func_args, attempts=1, wait=0):  # pylint: disable=R1710
    """
    Call function and re-execute it if it raises an Exception.
    :param func: the function to execute.
    :param func_args: the positional arguments of the function.
    :param attempts: the maximum number of attempts. Default: 1.
    :param wait: delay between attempts. Default: 0.
    :returns: the result of the function.
    """
    while attempts:
        try:
            return func(*func_args)
        except Exception as e:
            attempts -= 1
            if not attempts:
                raise e
            LOGGER.debug("%s, retrying in %s seconds..", e, wait)
            time.sleep(wait)
    return None