def METHOD_NAME(instance_name, bucket_name, region, zone, ssh_user, key_path, project_name):
    logging.info('Terminating Dataproc cluster and cleaning Dataproc config from bucket')
    try:
        labels = [
            {instance_name: '*'}
        ]
        clusters_list = GCPMeta.get_dataproc_list(labels)
        if clusters_list:
            for cluster_name in clusters_list:
                computational_name = GCPMeta.get_cluster(cluster_name).get('labels').get(
                    'computational_name')
                cluster = GCPMeta.get_list_cluster_statuses([cluster_name])
                GCPActions.bucket_cleanup(bucket_name, project_name, cluster_name)
                logging.info('The bucket {} has been cleaned successfully'.format(bucket_name))
                GCPActions.delete_dataproc_cluster(cluster_name, region)
                logging.info('The Dataproc cluster {} has been terminated successfully'.format(cluster_name))
                GCPActions.remove_kernels(instance_name, cluster_name, cluster[0]['version'], ssh_user,
                                          key_path, computational_name)
        else:
            logging.info("There are no Dataproc clusters to terminate.")
    except Exception as err:
        datalab.fab.append_result("Failed to terminate dataproc", str(err))
        sys.exit(1)
    logging.info("Stopping data engine cluster")
    try:
        clusters_list = GCPMeta.get_list_instances_by_label(zone, instance_name)
        if clusters_list.get('items'):
            for vm in clusters_list['items']:
                try:
                    GCPActions.stop_instance(vm['name'], zone)
                    logging.info("Instance {} has been stopped".format(vm['name']))
                except:
                    pass
        else:
            logging.info("There are no data engine clusters to terminate.")
    except Exception as err:
        datalab.fab.append_result("Failed to stop dataengine cluster", str(err))
        sys.exit(1)
    logging.info("Stopping notebook")
    try:
        GCPActions.stop_instance(instance_name, zone)
    except Exception as err:
        datalab.fab.append_result("Failed to stop instance", str(err))
        sys.exit(1)