code: def test_bedrock_aws_client(provider, config, aws_config):
      with mock.patch(
          "boto3.Session", return_value=mock.Mock()
      ) as mock_session:
          mock_client = mock.Mock()
          mock_assume_role = mock.Mock()
          mock_assume_role.return_value = mock.MagicMock()
  
          mock_session.return_value.client = mock_client
          mock_client.return_value.assume_role = mock_assume_role
  
          provider = AWSBedrockProvider(
              RouteConfig(
                  **_merge_model_and_aws_config(config, aws_config)
              )
          )
          provider.get_bedrock_client()
  
          if "aws_region" in aws_config:
              _assert_any_call_at_least(
                  mock_session, region_name=aws_config["aws_region"]
              )
  
          if "aws_role_arn" in aws_config:
              _assert_any_call_at_least(mock_client, service_name="sts")
              _assert_any_call_at_least(
                  mock_assume_role, RoleArn=aws_config["aws_role_arn"]
              )
              _assert_any_call_at_least(
                  mock_client, service_name="bedrock-runtime"
              )
  
          elif {"aws_secret_access_key", "aws_access_key_id"} <= set(
              aws_config
          ):
              _assert_any_call_at_least(
                  mock_client, service_name="bedrock-runtime"
              )
              _assert_any_call_at_least(
                  mock_client,
                  **{
                      k: v
                      for k, v in aws_config.items()
                      if k
                      in {"aws_secret_access_key", "aws_access_key_id"}
                  },
              )
  
file_path: mlflow/tests/gateway/providers/test_bedrock.py
imports: from unittest import mock
  import pytest
  from fastapi.encoders import jsonable_encoder
  from mlflow.gateway.config import AWSBaseConfig, AWSBedrockConfig, AWSIdAndKey, AWSRole, RouteConfig
  from mlflow.gateway.providers.bedrock import AWSBedrockModelProvider, AWSBedrockProvider
  from mlflow.gateway.schemas import completions
  from tests.gateway.providers.test_anthropic import completions_response
  from tests.gateway.providers.test_anthropic import parsed_completions_response
  from tests.gateway.providers.test_cohere import completions_response
label_desc: Use image node_id 6 for calling a global function with example usage: test_bedrock_aws_client(provider, config, aws_config) without return types