code: def test_create_training_job(train, LocalSession):
      local_sagemaker_client = (
          sagemaker.local.local_session.LocalSagemakerClient()
      )
  
      instance_count = 2
      image = "my-docker-image:1.0"
  
      algo_spec = {"TrainingImage": image}
      input_data_config = [
          {
              "ChannelName": "a",
              "DataSource": {
                  "S3DataSource": {
                      "S3DataDistributionType": "FullyReplicated",
                      "S3Uri": "s3://my_bucket/tmp/source1",
                  }
              },
          },
          {
              "ChannelName": "b",
              "DataSource": {
                  "FileDataSource": {
                      "FileDataDistributionType": "FullyReplicated",
                      "FileUri": "file:///tmp/source1",
                  }
              },
          },
      ]
      output_data_config = {}
      resource_config = {
          "InstanceType": "local",
          "InstanceCount": instance_count,
      }
      hyperparameters = {"a": 1, "b": "bee"}
  
      local_sagemaker_client.create_training_job(
          "my-training-job",
          algo_spec,
          output_data_config,
          resource_config,
          InputDataConfig=input_data_config,
          HyperParameters=hyperparameters,
      )
  
      expected = {
          "ResourceConfig": {"InstanceCount": instance_count},
          "TrainingJobStatus": "Completed",
          "ModelArtifacts": {"S3ModelArtifacts": "/some/path/to/model"},
      }
  
      response = local_sagemaker_client.describe_training_job(
          "my-training-job"
      )
  
      assert (
          response["TrainingJobStatus"] == expected["TrainingJobStatus"]
      )
      assert (
          response["ResourceConfig"]["InstanceCount"]
          == expected["ResourceConfig"]["InstanceCount"]
      )
      assert (
          response["ModelArtifacts"]["S3ModelArtifacts"]
          == expected["ModelArtifacts"]["S3ModelArtifacts"]
      )
  
imports: from __future__ import absolute_import
  import jsonschema
  import pytest
  import urllib3
  import os
  from botocore.exceptions import ClientError
  from mock import Mock, patch
  from tests.unit import DATA_DIR, SAGEMAKER_CONFIG_SESSION
  import sagemaker
  from sagemaker.workflow.parameters import ParameterString
  from sagemaker.workflow.pipeline import Pipeline
  from tests.unit.sagemaker.workflow.helpers import CustomStep
  from sagemaker.local.local_session import LocalSession
  from sagemaker.local.entities import _LocalPipelineExecution
label_desc: Use image node_id 7 for calling a global function with example usage: test_create_training_job(train, LocalSession) without return types