code: def test_load_or_create_when_exist(
      mock_create, mock_load, sagemaker_session
  ):
      tc_name = "tc_name"
      exists_error = botocore.exceptions.ClientError(
          error_response={
              "Error": {
                  "Code": "ValidationException",
                  "Message": "Experiment with name (experiment-xyz) already exists.",
              }
          },
          operation_name="foo",
      )
      mock_create.side_effect = exists_error
      _, is_existed = _TrialComponent._load_or_create(
          trial_component_name=tc_name,
          sagemaker_session=sagemaker_session,
      )
      mock_create.assert_called_once_with(
          trial_component_name=tc_name,
          display_name=None,
          tags=None,
          sagemaker_session=sagemaker_session,
      )
      assert is_existed
      mock_load.assert_called_once_with(
          tc_name,
          sagemaker_session,
      )
  
imports: from __future__ import absolute_import
  import datetime
  import unittest.mock
  from unittest.mock import patch
  import botocore
  from sagemaker import Session
  from sagemaker.experiments import _api_types
  from sagemaker.experiments._api_types import TrialComponentSearchResult, Parent, _TrialComponentStatusType
  from sagemaker.experiments.trial_component import _TrialComponent
label_desc: Use image node_id 10 for calling a global function with example usage: test_load_or_create_when_exist(mock_create, mock_load, sagemaker_session) without return types