code: def test_torch_distributed_trn1_pt_mnist(
      sagemaker_session,
      torch_distributed_framework_version,
      torch_distributed_py_version,
  ):
      job_name = sagemaker.utils.unique_name_from_base(
          "pt-torch-distributed"
      )
      estimator = PyTorch(
          entry_point="mnist_mlp_neuron.py",
          role="SageMakerRole",
          source_dir=torch_distributed_dir,
          instance_count=1,
          instance_type="ml.trn1.2xlarge",
          sagemaker_session=sagemaker_session,
          framework_version=torch_distributed_framework_version,
          py_version=torch_distributed_py_version,
          distribution={"torch_distributed": {"enabled": True}},
      )
  
      with timeout.timeout(
          minutes=integ.TRAINING_DEFAULT_TIMEOUT_MINUTES
      ):
          estimator.fit(
              {"training": _upload_training_data(estimator)},
              job_name=job_name,
          )
  
file_path: sagemaker-python-sdk/tests/integ/test_torch_distributed.py
imports: from __future__ import absolute_import
  import os
  import pytest
  import sagemaker.utils
  import tests.integ
  from sagemaker.pytorch import PyTorch
  from tests.integ import timeout
  from tests.integ.test_pytorch import _upload_training_data
label_desc: Use image node_id 1 for calling a global function with example usage: test_torch_distributed_trn1_pt_mnist(sagemaker_session, torch_distributed_framework_version, torch_distributed_py_version) without return types