def METHOD_NAME(notebook_name, dataproc_name, bucket_name, ssh_user, key_path):
    logging.info('Terminating Dataproc cluster and cleaning Dataproc config from bucket')
    try:
        cluster = GCPMeta.get_list_cluster_statuses([dataproc_name])
        if cluster[0]['status'] == 'running':
            computational_name = GCPMeta.get_cluster(dataproc_name).get('labels').get('computational_name')
            GCPActions.bucket_cleanup(bucket_name, dataproc_conf['project_name'], dataproc_name)
            logging.info('The bucket {} has been cleaned successfully'.format(bucket_name))
            GCPActions.delete_dataproc_cluster(dataproc_name, os.environ['gcp_region'])
            logging.info('The Dataproc cluster {} has been terminated successfully'.format(dataproc_name))
            GCPActions.remove_kernels(notebook_name, dataproc_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 cluster.", str(err))
        sys.exit(1)