code: def hook() -> Generator[SageMakerHook, None, None]:
      with mock_sagemaker():
          yield SageMakerHook(aws_conn_id="aws_default")
  
imports: from __future__ import annotations
  from typing import Generator
  from unittest import mock
  import pytest
  from moto import mock_sagemaker
  from airflow.providers.amazon.aws.hooks.sagemaker import SageMakerHook
  from airflow.providers.amazon.aws.operators.sagemaker import SageMakerCreateNotebookOperator, SageMakerDeleteNotebookOperator, SageMakerStartNoteBookOperator, SageMakerStopNotebookOperator
label_desc: Use image node_id 1 for calling a global function with example usage: hook() without return types