code: def test_private_github_with_2fa(
      sagemaker_local_session,
      sklearn_latest_version,
      sklearn_latest_py_version,
  ):
      script_path = "mnist.py"
      data_path = os.path.join(DATA_DIR, "sklearn_mnist")
      git_config = {
          "repo": PRIVATE_GIT_REPO_2FA,
          "branch": PRIVATE_BRANCH_2FA,
          "commit": PRIVATE_COMMIT_2FA,
          "2FA_enabled": True,
          "token": "",  # TODO: find a secure approach
      }
      source_dir = "sklearn"
  
      sklearn = SKLearn(
          entry_point=script_path,
          role="SageMakerRole",
          source_dir=source_dir,
          py_version=sklearn_latest_py_version,
          instance_count=1,
          instance_type="local",
          sagemaker_session=sagemaker_local_session,
          framework_version=sklearn_latest_version,
          hyperparameters={"epochs": 1},
          git_config=git_config,
      )
      train_input = "file://" + os.path.join(data_path, "train")
      test_input = "file://" + os.path.join(data_path, "test")
      sklearn.fit({"train": train_input, "test": test_input})
  
      assert os.path.isdir(sklearn.source_dir)
  
      with lock.lock(LOCK_PATH):
          try:
              client = sagemaker_local_session.sagemaker_client
              desc = client.describe_training_job(
                  TrainingJobName=sklearn.latest_training_job.name
              )
              model_data = desc["ModelArtifacts"]["S3ModelArtifacts"]
              model = SKLearnModel(
                  model_data,
                  "SageMakerRole",
                  entry_point=script_path,
                  framework_version=sklearn_latest_version,
                  source_dir=source_dir,
                  sagemaker_session=sagemaker_local_session,
                  git_config=git_config,
              )
              predictor = model.deploy(1, "local")
  
              data = numpy.zeros((100, 784), dtype="float32")
              result = predictor.predict(data)
              assert result is not None
          finally:
              predictor.delete_endpoint()
  
file_path: sagemaker-python-sdk/tests/integ/test_git.py
imports: from __future__ import absolute_import
  import os
  import numpy
  import pytest
  import subprocess
  import tempfile
  from tests.integ import lock
  from sagemaker.mxnet.estimator import MXNet
  from sagemaker.pytorch.estimator import PyTorch
  from sagemaker.sklearn.estimator import SKLearn
  from sagemaker.sklearn.model import SKLearnModel
  from tests.integ import DATA_DIR
label_desc: Use image node_id 3 for calling a global function with example usage: test_private_github_with_2fa(sagemaker_local_session, sklearn_latest_version, sklearn_latest_py_version) without return types