code: def mock_boto3_session(monkeypatch):
      """This fixture mocks boto3.Session and returns that object."""
      mock_session = MagicMock()
      monkeypatch.setattr(
          "boto3.Session",
          lambda *args, **kwargs: mock_session,
      )
      return mock_session
  
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 2 for calling a global function with example usage: mock_boto3_session(monkeypatch) and returns: mock_session