code: def rerun(client, run, job):
      
      from renku.models.provenance import ProcessRun
      activity = client.process_commmit()
  
      if not isinstance(activity, ProcessRun):
          click.secho('No tool was found.', fg='red', file=sys.stderr)
          return
  
      try:
          args = ['cwl-runner', activity.path]
          if job:
              job_file = tempfile.NamedTemporaryFile(
                  suffix='.yml', dir=os.getcwd(), delete=False
              )
              args.append(job_file.name)
  
              with job_file as fp:
                  yaml.dump(yaml.safe_load(job), stream=fp, encoding='utf-8')
  
          if run:
              return call(args, cwd=os.getcwd())
      finally:
          if job:
              os.unlink(job_file.name)
docs: Re-run existing workflow or tool using CWL runner.