def METHOD_NAME(router, commit, job):
    if not router.is_usable_for_task(job=job, logger=logger):
        job.mark_completed("Task cancelled")
        return False
    job.mark_running("Trying to install configuration.", object=router, logger=logger)
    error, changes = router.METHOD_NAME(
        router.generate_configuration(), commit=commit
    )
    if error:
        job.set_output(error)
        job.mark_failed(
            "Failed to install configuration.", object=router, logger=logger
        )
        return False
    if not changes:
        job.mark_completed("No configuration to install.", object=router, logger=logger)
    else:
        job.set_output(changes)
        job.mark_completed(
            "Configuration installed."
            if commit
            else "Configuration differences found.",
            object=router,
            logger=logger,
        )
    return True