async def METHOD_NAME(capture_events, init_arq, source, job_fails):
    async def division(_, a, b=0):
        return a / b
    division.__qualname__ = division.__name__
    cron_func = async_partial(division, a=1, b=int(not job_fails))
    cron_func.__qualname__ = division.__name__
    cron_job = cron(cron_func, minute=0, run_at_startup=True)
    functions_key, cron_jobs_key = source
    pool, worker = init_arq(**{functions_key: [division], cron_jobs_key: [cron_job]})
    events = capture_events()
    job = await pool.enqueue_job("division", 1, b=int(not job_fails))
    await worker.run_job(job.job_id, timestamp_ms())
    loop = asyncio.get_event_loop()
    task = loop.create_task(worker.async_run())
    await asyncio.sleep(1)
    task.cancel()
    await worker.close()
    if job_fails:
        error_func_event = events.pop(0)
        error_cron_event = events.pop(1)
        assert error_func_event["exception"]["values"][0]["type"] == "ZeroDivisionError"
        assert error_func_event["exception"]["values"][0]["mechanism"]["type"] == "arq"
        func_extra = error_func_event["extra"]["arq-job"]
        assert func_extra["task"] == "division"
        assert error_cron_event["exception"]["values"][0]["type"] == "ZeroDivisionError"
        assert error_cron_event["exception"]["values"][0]["mechanism"]["type"] == "arq"
        cron_extra = error_cron_event["extra"]["arq-job"]
        assert cron_extra["task"] == "cron:division"
    [func_event, cron_event] = events
    assert func_event["type"] == "transaction"
    assert func_event["transaction"] == "division"
    assert func_event["transaction_info"] == {"source": "task"}
    assert "arq_task_id" in func_event["tags"]
    assert "arq_task_retry" in func_event["tags"]
    func_extra = func_event["extra"]["arq-job"]
    assert func_extra["task"] == "division"
    assert func_extra["kwargs"] == {"b": int(not job_fails)}
    assert func_extra["retry"] == 1
    assert cron_event["type"] == "transaction"
    assert cron_event["transaction"] == "cron:division"
    assert cron_event["transaction_info"] == {"source": "task"}
    assert "arq_task_id" in cron_event["tags"]
    assert "arq_task_retry" in cron_event["tags"]
    cron_extra = cron_event["extra"]["arq-job"]
    assert cron_extra["task"] == "cron:division"
    assert cron_extra["kwargs"] == {}
    assert cron_extra["retry"] == 1