<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def CancelJob(r, job_id, dry_run=False):
 """ Cancels a job. @type job_id: int @param job_id: id of the job to delete @type dry_run: bool @param dry_run: whether to perform a dry run """


    return r.request("delete", "/2/jobs/%s" % job_id,
                             query={"dry-run": dry_run})