code: def test_create_with_tags(sagemaker_session):
      client = sagemaker_session.sagemaker_client
      client.create_trial_component.return_value = {
          "TrialComponentArn": "bazz",
      }
      tags = [{"Key": "foo", "Value": "bar"}]
      _TrialComponent.create(
          trial_component_name="foo",
          display_name="bar",
          sagemaker_session=sagemaker_session,
          tags=tags,
      )
      client.create_trial_component.assert_called_with(
          TrialComponentName="foo", DisplayName="bar", Tags=tags
      )
  
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 2 for calling a global function with example usage: test_create_with_tags(sagemaker_session) without return types