code: def test_save(trial_component_obj, sagemaker_session):
      trial_component_obj.display_name = str(uuid.uuid4())
      trial_component_obj.status = _api_types.TrialComponentStatus(
          primary_status=_TrialComponentStatusType.InProgress.value,
          message="Message",
      )
      trial_component_obj.start_time = datetime.datetime.now(
          datetime.timezone.utc
      ) - datetime.timedelta(days=1)
      trial_component_obj.end_time = datetime.datetime.now(
          datetime.timezone.utc
      )
      trial_component_obj.parameters = {"foo": "bar", "whizz": 100.1}
      trial_component_obj.input_artifacts = {
          "snizz": _api_types.TrialComponentArtifact(
              value="s3:/foo/bar", media_type="text/plain"
          ),
          "snizz1": _api_types.TrialComponentArtifact(
              value="s3:/foo/bar2", media_type="text/plain2"
          ),
      }
      trial_component_obj.output_artifacts = {
          "fly": _api_types.TrialComponentArtifact(
              value="s3:/sky/far", media_type="away/tomorrow"
          ),
          "fly2": _api_types.TrialComponentArtifact(
              value="s3:/sky/far2", media_type="away/tomorrow2"
          ),
      }
      trial_component_obj.parameters_to_remove = ["foo"]
      trial_component_obj.input_artifacts_to_remove = ["snizz"]
      trial_component_obj.output_artifacts_to_remove = ["fly2"]
  
      trial_component_obj.save()
  
      loaded = trial_component._TrialComponent.load(
          trial_component_name=trial_component_obj.trial_component_name,
          sagemaker_session=sagemaker_session,
      )
  
      assert (
          trial_component_obj.trial_component_name
          == loaded.trial_component_name
      )
      assert trial_component_obj.status == loaded.status
  
      assert (
          trial_component_obj.start_time - loaded.start_time
          < datetime.timedelta(seconds=1)
      )
      assert (
          trial_component_obj.end_time - loaded.end_time
          < datetime.timedelta(seconds=1)
      )
  
      assert loaded.parameters == {"whizz": 100.1}
      assert loaded.input_artifacts == {
          "snizz1": _api_types.TrialComponentArtifact(
              value="s3:/foo/bar2", media_type="text/plain2"
          )
      }
      assert loaded.output_artifacts == {
          "fly": _api_types.TrialComponentArtifact(
              value="s3:/sky/far", media_type="away/tomorrow"
          )
      }
  
file_path: sagemaker-python-sdk/tests/integ/sagemaker/experiments/test_trial_component.py
imports: from __future__ import absolute_import
  import datetime
  import uuid
  from sagemaker.experiments._api_types import _TrialComponentStatusType
  from tests.integ.sagemaker.experiments.helpers import EXP_INTEG_TEST_NAME_PREFIX
  from sagemaker.experiments import _api_types, trial_component
  from sagemaker.utilities.search_expression import Filter, Operator, SearchExpression
label_desc: Use image node_id 4 for calling a global function with example usage: test_save(trial_component_obj, sagemaker_session) without return types