code: def test_create_training_job_invalid_data_source(train, LocalSession):
      local_sagemaker_client = (
          sagemaker.local.local_session.LocalSagemakerClient()
      )
  
      instance_count = 2
      image = "my-docker-image:1.0"
  
      algo_spec = {"TrainingImage": image}
  
      # InvalidDataSource is not supported. S3DataSource and FileDataSource are currently the only
      # valid Data Sources. We expect a ValueError if we pass this input data config.
      input_data_config = [
          {
              "ChannelName": "a",
              "DataSource": {
                  "InvalidDataSource": {
                      "FileDataDistributionType": "FullyReplicated",
                      "FileUri": "ftp://myserver.com/tmp/source1",
                  }
              },
          }
      ]
  
      output_data_config = {}
      resource_config = {
          "InstanceType": "local",
          "InstanceCount": instance_count,
      }
      hyperparameters = {"a": 1, "b": "bee"}
  
      with pytest.raises(ValueError):
          local_sagemaker_client.create_training_job(
              "my-training-job",
              algo_spec,
              output_data_config,
              resource_config,
              InputDataConfig=input_data_config,
              HyperParameters=hyperparameters,
          )
  
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 9 for calling a global function with example usage: test_create_training_job_invalid_data_source(train, LocalSession) without return types