<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def requeue(rq, ctx, all, job_ids):
    "Requeue failed jobs."
    return ctx.invoke(
        rq_cli.requeue,
        all=all,
        job_ids=job_ids,
        **shared_options(rq)
    )