async def METHOD_NAME(
    async_docker_client: Docker, docker_version: DockerVersion, volume_names: list[str]
) -> str:
    volume_names_seq = " ".join(volume_names)
    formatted_command = SH_SCRIPT_REMOVE_VOLUMES.format(
        volume_names_seq=volume_names_seq, retries=3, sleep=0.1
    )
    print("Container will run:\n%s", formatted_command)
    command = ["sh", "-c", formatted_command]
    container = await async_docker_client.containers.run(
        config={
            "Cmd": command,
            "Image": f"docker:{docker_version}-dind",
            "HostConfig": {"Binds": ["/var/run/docker.sock:/var/run/docker.sock"]},
        },
    )
    await container.start()
    await container.wait()
    logs = await container.log(stderr=True, stdout=True)
    await container.delete(force=True)
    return "".join(logs)