code: def test_create_model_with_custom_image(
      name_from_base, sagemaker_session
  ):
      container_log_level = '"logging.INFO"'
      source_dir = "s3://mybucket/source"
      image = "pytorch:9000"
      base_job_name = "job"
  
      pytorch = PyTorch(
          entry_point=SCRIPT_PATH,
          role=ROLE,
          sagemaker_session=sagemaker_session,
          instance_count=INSTANCE_COUNT,
          instance_type=INSTANCE_TYPE,
          container_log_level=container_log_level,
          image_uri=image,
          base_job_name=base_job_name,
          source_dir=source_dir,
      )
  
      pytorch.fit(inputs="s3://mybucket/train", job_name="new_name")
  
      model_name = "model_name"
      name_from_base.return_value = model_name
      model = pytorch.create_model()
  
      assert model.sagemaker_session == sagemaker_session
      assert model.image_uri == image
      assert model.entry_point == SCRIPT_PATH
      assert model.role == ROLE
      assert model.name == model_name
      assert model.container_log_level == container_log_level
      assert model.source_dir == source_dir
  
      name_from_base.assert_called_with(base_job_name)
  
imports: from __future__ import absolute_import
  import logging
  import json
  import os
  import pytest
  from mock import ANY, MagicMock, Mock, patch
  from packaging.version import Version
  from sagemaker import image_uris
  from sagemaker.pytorch import defaults
  from sagemaker.pytorch import PyTorch, PyTorchPredictor, PyTorchModel
  from sagemaker.instance_group import InstanceGroup
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 9 for calling a global function with example usage: test_create_model_with_custom_image(name_from_base, sagemaker_session) without return types