def METHOD_NAME(df_service, pipeline_job):
    """Poll the job status every 60 seconds until done."""
    dataflow_project = pipeline_job['projectId']
    template_region = pipeline_job['location']
    job_id = pipeline_job['id']
    pipeline_job = df_service.projects().locations().jobs().get(
        location=template_region, projectId=dataflow_project,
        jobId=job_id).execute(num_retries=5)
    logging.info('job status %s', pprint.pformat(pipeline_job))
    current_state = pipeline_job['currentState']
    # We have reached a terminal state.
    if current_state in [
        'JOB_STATE_DONE', 'JOB_STATE_FAILED', 'JOB_STATE_CANCELLED',
        'JOB_STATE_UPDATED', 'JOB_STATE_DRAINED'
    ]:
        logging.info('final pipeline state : %s', current_state)
        return current_state, pipeline_job
    logging.info('sleeping 60 seconds before repolling.')
    time.sleep(60)
    return METHOD_NAME(df_service, pipeline_job)