code: def test_deploy_model(
      chainer_local_training_job,
      sagemaker_local_session,
      chainer_latest_version,
      chainer_latest_py_version,
  ):
      script_path = os.path.join(DATA_DIR, "chainer_mnist", "mnist.py")
  
      model = ChainerModel(
          chainer_local_training_job.model_data,
          "SageMakerRole",
          entry_point=script_path,
          sagemaker_session=sagemaker_local_session,
          framework_version=chainer_latest_version,
          py_version=chainer_latest_py_version,
      )
  
      predictor = model.deploy(1, "local")
      try:
          _predict_and_assert(predictor)
      finally:
          predictor.delete_endpoint()
  
file_path: sagemaker-python-sdk/tests/integ/test_chainer.py
imports: from __future__ import absolute_import
  import os
  import numpy
  import pytest
  from sagemaker.chainer.estimator import Chainer
  from sagemaker.chainer.model import ChainerModel
  from sagemaker.utils import unique_name_from_base
  from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
label_desc: Use image node_id 5 for calling a global function with example usage: test_deploy_model(chainer_local_training_job, sagemaker_local_session, chainer_latest_version, chainer_latest_py_version) without return types