code: def test_local_fit_deploy(
      sagemaker_local_session,
      pytorch_inference_latest_version,
      pytorch_inference_latest_py_version,
  ):
      pytorch = PyTorch(
          entry_point=MNIST_SCRIPT,
          role="SageMakerRole",
          framework_version=pytorch_inference_latest_version,
          py_version=pytorch_inference_latest_py_version,
          instance_count=1,
          instance_type="local",
          sagemaker_session=sagemaker_local_session,
      )
  
      pytorch.fit(
          {"training": "file://" + os.path.join(MNIST_DIR, "training")}
      )
  
      predictor = pytorch.deploy(1, "local")
      try:
          batch_size = 100
          data = numpy.random.rand(batch_size, 1, 28, 28).astype(
              numpy.float32
          )
          output = predictor.predict(data)
  
          assert output.shape == (batch_size, 10)
      finally:
          predictor.delete_endpoint()
  
imports: from __future__ import absolute_import
  import numpy
  import os
  import pytest
  from sagemaker.pytorch.estimator import PyTorch
  from sagemaker.pytorch.model import PyTorchModel
  from sagemaker.pytorch.processing import PyTorchProcessor
  from sagemaker.serverless import ServerlessInferenceConfig
  from sagemaker.utils import unique_name_from_base
  from tests.integ import test_region, DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES, EI_SUPPORTED_REGIONS
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
label_desc: Use image node_id 6 for calling a global function with example usage: test_local_fit_deploy(sagemaker_local_session, pytorch_inference_latest_version, pytorch_inference_latest_py_version) without return types