code: def test_run_from_local_and_train_job_and_exp_cfg_not_match(
      sagemaker_session,
      dev_sdk_tar,
      execution_role,
      sagemaker_client_config,
      sagemaker_metrics_config,
  ):
      # Notes:
      # 1. The 1st Run created locally and its exp config was auto passed to the job
      # 2. In training job, different exp and run names (i.e. 2nd Run) are given
      # in the Run constructor which will create a Run according to the run_name
      # passed in there and ignore the exp config in the job
      # 3. Both metrics and parameters are logged in the Run created in job
      # 4. In a different training job, load the 2nd Run and log more parameters there.
      exp_name = unique_name_from_base(_EXP_NAME_BASE_IN_SCRIPT)
      exp_name2 = unique_name_from_base(_EXP_NAME_BASE_IN_SCRIPT)
      estimator = _generate_estimator(
          sdk_tar=dev_sdk_tar,
          sagemaker_session=sagemaker_session,
          exp_name=exp_name,
          execution_role=execution_role,
          sagemaker_client_config=sagemaker_client_config,
          sagemaker_metrics_config=sagemaker_metrics_config,
      )
      tc_name = Run._generate_trial_component_name(
          experiment_name=exp_name, run_name=_RUN_NAME_IN_SCRIPT
      )
  
      with cleanup_exp_resources(
          exp_names=[exp_name, exp_name2],
          sagemaker_session=sagemaker_session,
      ):
          with Run(
              experiment_name=exp_name2,
              run_name=f"{_RUN_NAME_IN_SCRIPT}2",
              sagemaker_session=sagemaker_session,
          ) as run:
              init_start_time = _check_tc_status_when_entering(
                  run._trial_component
              )
              # experiment_config is auto passed in by _RunContext
              estimator.fit(
                  job_name=f"train-job-{name()}",
                  wait=True,  # wait the training job to finish
                  logs="None",  # set to "All" to display logs fetched from the training job
              )
              _check_tc_status_intermediate(
                  trial_component=run._trial_component,
                  sagemaker_session=sagemaker_session,
                  init_start_time=init_start_time,
              )
  
          old_end_time = _check_tc_status_when_exiting(
              trial_component_name=run._trial_component.trial_component_name,
              init_start_time=init_start_time,
              sagemaker_session=sagemaker_session,
          )
          assert run.experiment_name != exp_name
          assert run.run_name != _RUN_NAME_IN_SCRIPT
          _check_run_from_job_result(
              tc_name=tc_name,
              sagemaker_session=sagemaker_session,
          )
  
          with run:
              estimator.environment["RUN_OPERATION"] = _RUN_LOAD
              estimator.fit(
                  job_name=f"train-job-{name()}",
                  wait=True,  # wait the training job to finish
                  logs="None",  # set to "All" to display logs fetched from the training job
              )
              _check_tc_status_intermediate(
                  trial_component=run._trial_component,
                  sagemaker_session=sagemaker_session,
                  init_start_time=init_start_time,
                  old_end_time=old_end_time,
              )
  
          _check_tc_status_when_exiting(
              trial_component_name=run._trial_component.trial_component_name,
              init_start_time=init_start_time,
              old_end_time=old_end_time,
              sagemaker_session=sagemaker_session,
          )
          _check_run_from_job_result(
              tc_name=tc_name,
              sagemaker_session=sagemaker_session,
              is_init=False,
          )
  
imports: from __future__ import absolute_import
  import datetime
  import json
  import os
  import time
  import pytest
  from tests.conftest import CUSTOM_S3_OBJECT_KEY_PREFIX
  from tests.integ.sagemaker.experiments.conftest import TAGS
  from sagemaker.experiments._api_types import _TrialComponentStatusType
  from sagemaker.experiments._utils import is_run_trial_component
  from sagemaker.processing import FrameworkProcessor
  from sagemaker.pytorch import PyTorch
  from sagemaker.s3 import S3Uploader
  from sagemaker.xgboost import XGBoostModel
  from tests.integ import DATA_DIR
  from sagemaker.experiments._metrics import BATCH_SIZE
  from sagemaker.experiments.trial_component import _TrialComponent
  from sagemaker.sklearn import SKLearn
  from sagemaker.utils import retry_with_backoff, unique_name_from_base
  from tests.integ.sagemaker.experiments.helpers import name, cleanup_exp_resources
  from sagemaker.experiments.run import RUN_NAME_BASE, DELIMITER
  from sagemaker.experiments import Run, load_run, list_runs
  from sagemaker.experiments._helper import _DEFAULT_ARTIFACT_PREFIX
label_desc: Use image node_id 6 for calling a global function with example usage: test_run_from_local_and_train_job_and_exp_cfg_not_match(sagemaker_session, dev_sdk_tar, execution_role, sagemaker_client_config, sagemaker_metrics_config) without return types