code: def test_run_load_no_run_name_and_in_train_job_but_fail_to_get_exp_cfg(
      mock_run_env, sagemaker_session
  ):
      rv = Mock()
      rv.source_arn = "arn:1234/my-train-job"
      rv.environment_type = (
          _environment._EnvironmentType.SageMakerTrainingJob
      )
      mock_run_env.load.return_value = rv
  
      # No Run object is created else where
      sagemaker_session.sagemaker_client.describe_training_job.return_value = {
          "TrainingJobName": "train-job-experiments",
      }
  
      with pytest.raises(RuntimeError) as err:
          with load_run(sagemaker_session=sagemaker_session):
              pass
  
      assert (
          "Not able to fetch RunName in ExperimentConfig of the sagemaker job"
          in str(err)
      )
  
imports: from __future__ import absolute_import
  import datetime
  import unittest
  import cloudpickle
  from math import inf, nan
  from unittest.mock import patch, Mock, MagicMock
  import dateutil
  import pytest
  from sagemaker.experiments import _environment, SortOrderType
  from sagemaker.experiments._api_types import TrialComponentArtifact, TrialComponentSummary, TrialComponentStatus, _TrialComponentStatusType, TrialComponentSearchResult
  from sagemaker.experiments.experiment import Experiment
  from sagemaker.experiments.run import TRIAL_NAME_TEMPLATE, MAX_RUN_TC_ARTIFACTS_LEN, MAX_NAME_LEN_IN_BACKEND, EXPERIMENT_NAME, RUN_NAME, TRIAL_NAME, DELIMITER, RUN_TC_TAG, SortByType
  from sagemaker.experiments import Run, load_run, list_runs
  from sagemaker.experiments.trial import _Trial
  from sagemaker.experiments.trial_component import _TrialComponent
  from sagemaker.experiments._helper import _DEFAULT_ARTIFACT_PREFIX
  from tests.unit.sagemaker.experiments.helpers import mock_trial_load_or_create_func, mock_tc_load_or_create_func, TEST_EXP_NAME, TEST_EXP_NAME_MIXED_CASE, TEST_RUN_NAME, TEST_EXP_DISPLAY_NAME, TEST_RUN_DISPLAY_NAME, TEST_ARTIFACT_BUCKET, TEST_ARTIFACT_PREFIX, TEST_TAGS
label_desc: Use image node_id 4 for calling a global function with example usage: test_run_load_no_run_name_and_in_train_job_but_fail_to_get_exp_cfg(mock_run_env, sagemaker_session) without return types