code: def test_compile_creates_session(session):
      session.return_value.boto_region_name = REGION
      session.return_value.sagemaker_config = {}
  
      model = _create_model()
      model.compile(
          target_instance_family="ml_c4",
          input_shape={"data": [1, 3, 1024, 1024]},
          output_path="s3://output",
          role="role",
          framework="tensorflow",
          job_name="compile-model",
      )
  
      assert session.return_value == model.sagemaker_session
  
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock, patch
  from sagemaker.model import Model
label_desc: Use image node_id 10 for calling a global function with example usage: test_compile_creates_session(session) without return types