def METHOD_NAME(process):
    import multiprocessing
    if not isinstance(process, multiprocessing.Process):
        raise Exception("invalid process argument passed to kill_process")
    if sys.version_info >= (3, 7):
        # Kill added in 3.7
        process.kill()
    else:
        process.terminate()