def METHOD_NAME(resource_group_name, notebook_name, os_user, key_path, cluster_name):
    logging.info("Terminating data engine cluster")
    try:
        for vm in AzureMeta.compute_client.virtual_machines.list(resource_group_name):
            if "Name" in vm.tags:
                if cluster_name == vm.tags["Name"]:
                    AzureActions.remove_instance(resource_group_name, vm.name)
                    logging.info("Instance {} has been terminated".format(vm.name))
    except Exception as err:
        datalab.fab.append_result("Failed to terminate dataengine", str(err))
        sys.exit(1)
    logging.info("Removing Data Engine kernels from notebook")
    try:
        AzureActions.remove_dataengine_kernels(resource_group_name, notebook_name, os_user, key_path, cluster_name)
    except Exception as err:
        datalab.fab.append_result("Failed to remove dataengine kernels from notebook", str(err))
        sys.exit(1)