code: def test_linearlearner_airflow_config_uploads_data_source_to_s3(
      sagemaker_session, cpu_instance_type
  ):
      with timeout(seconds=AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS):
          training_set = datasets.one_p_mnist()
          training_set[1][:100] = 1
          training_set[1][100:200] = 0
          training_set = training_set[0], training_set[1].astype(
              np.dtype("float32")
          )
  
          ll = LinearLearner(
              ROLE,
              1,
              cpu_instance_type,
              predictor_type="binary_classifier",
              sagemaker_session=sagemaker_session,
          )
          ll.binary_classifier_model_selection_criteria = "accuracy"
          ll.target_recall = 0.5
          ll.target_precision = 0.5
          ll.positive_example_weight_mult = 0.1
          ll.epochs = 1
          ll.use_bias = True
          ll.num_models = 1
          ll.num_calibration_samples = 1
          ll.init_method = "uniform"
          ll.init_scale = 0.5
          ll.init_sigma = 0.2
          ll.init_bias = 5
          ll.optimizer = "adam"
          ll.loss = "logistic"
          ll.wd = 0.5
          ll.l1 = 0.5
          ll.momentum = 0.5
          ll.learning_rate = 0.1
          ll.beta_1 = 0.1
          ll.beta_2 = 0.1
          ll.use_lr_scheduler = True
          ll.lr_scheduler_step = 2
          ll.lr_scheduler_factor = 0.5
          ll.lr_scheduler_minimum_lr = 0.1
          ll.normalize_data = False
          ll.normalize_label = False
          ll.unbias_data = True
          ll.unbias_label = False
          ll.num_point_for_scaler = 10000
          ll.margin = 1.0
          ll.quantile = 0.5
          ll.loss_insensitivity = 0.1
          ll.huber_delta = 0.1
          ll.early_stopping_tolerance = 0.0001
          ll.early_stopping_patience = 3
  
          records = ll.record_set(
              training_set[0][:200], training_set[1][:200]
          )
  
          training_config = _build_airflow_workflow(
              estimator=ll,
              instance_type=cpu_instance_type,
              inputs=records,
          )
  
          _assert_that_s3_url_contains_data(
              sagemaker_session,
              training_config["InputDataConfig"][0]["DataSource"][
                  "S3DataSource"
              ]["S3Uri"],
          )
  
imports: from __future__ import absolute_import
  import os
  import pytest
  import numpy
  from configparser import ParsingError
  from sagemaker.utils import retries
  from six.moves.urllib.parse import urlparse
  import tests.integ
  from sagemaker import KMeans, FactorizationMachines, IPInsights, KNN, LDA, LinearLearner, NTM, PCA, RandomCutForest, image_uris
  from sagemaker.amazon.common import read_records
  from sagemaker.chainer import Chainer
  from sagemaker.estimator import Estimator
  from sagemaker.mxnet import MXNet
  from sagemaker.pytorch.estimator import PyTorch
  from sagemaker.sklearn import SKLearn
  from sagemaker.tensorflow import TensorFlow
  from sagemaker.utils import sagemaker_timestamp
  from sagemaker.xgboost import XGBoost
  from tests.integ import datasets, DATA_DIR
  from tests.integ.record_set import prepare_record_set_from_local_files
  from tests.integ.timeout import timeout
label_desc: Use image node_id 7 for calling a global function with example usage: test_linearlearner_airflow_config_uploads_data_source_to_s3(sagemaker_session, cpu_instance_type) without return types