code: def _download_and_verify_output_notebook(
      output_s3_uri,
      output_notebook_name,
      verification,
      sagemaker_session,
      kms_key=None,
  ):
      with _tmpdir() as temp_output_folder:
          S3Downloader.download(
              output_s3_uri,
              temp_output_folder,
              sagemaker_session=sagemaker_session,
              kms_key=kms_key,
          )
  
          with tarfile.open(
              os.path.join(temp_output_folder, "output.tar.gz"), "r:gz"
          ) as tar:
              tar.extract(output_notebook_name, temp_output_folder)
  
          notebook_cells = NotebookUtils.get_notebook_cells(
              os.path.join(temp_output_folder, output_notebook_name)
          )
          verification(notebook_cells)
  
imports: from __future__ import absolute_import
  import os.path
  import tarfile
  import logging
  import nbformat
  import pytest
  from sagemaker import get_execution_role
  from sagemaker.s3 import S3Downloader
  from sagemaker.s3_utils import s3_path_join
  from sagemaker.utils import name_from_base
  from sagemaker.workflow import ParameterString
  from sagemaker.workflow.notebook_job_step import NotebookJobStep
  from sagemaker.workflow.parameters import ParameterInteger, ParameterBoolean
  from sagemaker.workflow.pipeline import Pipeline
  from sagemaker.utils import _tmpdir
  from tests.integ.retry import retries
  from tests.integ.sagemaker.workflow.helpers import wait_pipeline_execution
  from tests.integ import kms_utils
  from sagemaker.workflow.function_step import step
label_desc: Use image node_id 6 for calling a global function with example usage: _download_and_verify_output_notebook(output_s3_uri, output_notebook_name, verification, sagemaker_session, kms_key) without return types