code: def test_create_model_with_optional_params(
      sagemaker_session,
      pytorch_inference_version,
      pytorch_inference_py_version,
  ):
      container_log_level = '"logging.INFO"'
      source_dir = "s3://mybucket/source"
      pytorch = PyTorch(
          entry_point=SCRIPT_PATH,
          framework_version=pytorch_inference_version,
          py_version=pytorch_inference_py_version,
          role=ROLE,
          sagemaker_session=sagemaker_session,
          instance_count=INSTANCE_COUNT,
          instance_type=INSTANCE_TYPE,
          container_log_level=container_log_level,
          base_job_name="job",
          source_dir=source_dir,
      )
  
      pytorch.fit(inputs="s3://mybucket/train", job_name="new_name")
  
      new_role = "role"
      model_server_workers = 2
      vpc_config = {"Subnets": ["foo"], "SecurityGroupIds": ["bar"]}
      model_name = "model-name"
      model = pytorch.create_model(
          role=new_role,
          model_server_workers=model_server_workers,
          vpc_config_override=vpc_config,
          entry_point=SERVING_SCRIPT_FILE,
          env=ENV,
          name=model_name,
      )
  
      assert model.role == new_role
      assert model.model_server_workers == model_server_workers
      assert model.vpc_config == vpc_config
      assert model.entry_point == SERVING_SCRIPT_FILE
      assert model.env == ENV
      assert model.name == model_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 8 for calling a global function with example usage: test_create_model_with_optional_params(sagemaker_session, pytorch_inference_version, pytorch_inference_py_version) without return types