code: def test_load(sagemaker_session):
      now = datetime.datetime.now(datetime.timezone.utc)
      client = sagemaker_session.sagemaker_client
      client.describe_trial_component.return_value = {
          "TrialComponentArn": "A",
          "TrialComponentName": "B",
          "DisplayName": "C",
          "Status": {
              "PrimaryStatus": _TrialComponentStatusType.InProgress.value,
              "Message": "D",
          },
          "Parameters": {
              "E": {"NumberValue": 1.0},
              "F": {"StringValue": "G"},
          },
          "InputArtifacts": {
              "H": {"Value": "s3://foo/bar", "MediaType": "text/plain"}
          },
          "OutputArtifacts": {
              "I": {
                  "Value": "s3://whizz/bang",
                  "MediaType": "text/plain",
              }
          },
          "Metrics": [
              {
                  "MetricName": "J",
                  "Count": 1,
                  "Min": 1.0,
                  "Max": 2.0,
                  "Avg": 3.0,
                  "StdDev": 4.0,
                  "SourceArn": "K",
                  "Timestamp": now,
              }
          ],
      }
      obj = _TrialComponent.load(
          trial_component_name="foo",
          sagemaker_session=sagemaker_session,
      )
      client.describe_trial_component.assert_called_with(
          TrialComponentName="foo"
      )
      assert "A" == obj.trial_component_arn
      assert "B" == obj.trial_component_name
      assert "C" == obj.display_name
      assert (
          _api_types.TrialComponentStatus(
              primary_status=_TrialComponentStatusType.InProgress.value,
              message="D",
          )
          == obj.status
      )
      assert {"E": 1.0, "F": "G"} == obj.parameters
      assert {
          "H": _api_types.TrialComponentArtifact(
              value="s3://foo/bar", media_type="text/plain"
          )
      }
      assert {
          "I": _api_types.TrialComponentArtifact(
              value="s3://whizz/bang", media_type="text/plain"
          )
      }
      assert [
          _api_types.TrialComponentMetricSummary(
              metric_name="J",
              count=1,
              min=1.0,
              max=2.0,
              avg=3.0,
              std_dev=4.0,
              source_arn="K",
              timestamp=now,
          )
      ]
  
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 3 for calling a global function with example usage: test_load(sagemaker_session) without return types