code: def test_search(sagemaker_session):
      client = sagemaker_session.sagemaker_client
      client.search.return_value = {
          "Results": [
              {
                  "TrialComponent": {
                      "TrialComponentName": "tc-1",
                      "TrialComponentArn": "arn::tc-1",
                      "DisplayName": "TC1",
                      "Parents": [
                          {
                              "ExperimentName": "e-1",
                              "TrialName": "t-1",
                          },
                          {
                              "ExperimentName": "e-2",
                              "TrialName": "t-2",
                          },
                      ],
                  }
              },
              {
                  "TrialComponent": {
                      "TrialComponentName": "tc-2",
                      "TrialComponentArn": "arn::tc-2",
                      "DisplayName": "TC2",
                  }
              },
          ]
      }
      expected = [
          TrialComponentSearchResult(
              trial_component_name="tc-1",
              trial_component_arn="arn::tc-1",
              display_name="TC1",
              parents=[
                  Parent(experiment_name="e-1", trial_name="t-1"),
                  Parent(experiment_name="e-2", trial_name="t-2"),
              ],
          ),
          TrialComponentSearchResult(
              trial_component_name="tc-2",
              trial_component_arn="arn::tc-2",
              display_name="TC2",
          ),
      ]
      assert expected == list(
          _TrialComponent.search(sagemaker_session=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 12 for calling a global function with example usage: test_search(sagemaker_session) without return types