code: def mock_ecr_client(mock_boto3_session):
      """This fixture mocks boto3.Session.client and returns that object."""
      mock_ecr_client = MagicMock()
      mock_boto3_session.client.return_value = mock_ecr_client
      return mock_ecr_client
  
file_path: wandb/tests/pytest_tests/unit_tests/test_launch/test_registry/test_ecr.py
imports: from unittest.mock import MagicMock
  import botocore.exceptions
  import pytest
  from wandb.sdk.launch.errors import LaunchError
  from wandb.sdk.launch.registry.elastic_container_registry import ElasticContainerRegistry
label_desc: Use image node_id 3 for calling a global function with example usage: mock_ecr_client(mock_boto3_session) and returns: mock_ecr_client