code: def init_mock_client() -> Iterator[tuple[str, S3Client]]:
      with mock_s3():
          # Runs before each test
          bucket_name = "moto-bucket"
          s3_client = boto3.client("s3")
          s3_client.create_bucket(Bucket=bucket_name)
  
          yield bucket_name, s3_client
  
          # Runs after each test
          objects = s3_client.list_objects(Bucket=bucket_name).get(
              "Contents", []
          )
          if objects:
              s3_client.delete_objects(
                  Bucket=bucket_name,
                  Delete={
                      "Objects": [
                          {"Key": obj["Key"] for obj in objects}
                      ],
                      "Quiet": True,
                  },
              )
          s3_client.delete_bucket(Bucket=bucket_name)
  
file_path: optuna/tests/artifacts_tests/test_boto3.py
imports: from __future__ import annotations
  import io
  from typing import TYPE_CHECKING
  import boto3
  from moto import mock_s3
  import pytest
  from optuna.artifacts import Boto3ArtifactStore
  from optuna.artifacts.exceptions import ArtifactNotFound
label_desc: Use image node_id 1 for calling a global function with example usage: init_mock_client() without return types