def METHOD_NAME(proc):
    logger.info('Try kill process')
    times = 1
    while proc.poll() is None:
        proc.kill()
        time.sleep(5)
        if proc.poll() is not None:
            logger.info('Process has been killed')
            break
        logger.info('Trial %d failed', times)
        times += 1
        if times > 3:
            raise SystemExit()