async def METHOD_NAME(subnet_tag, payment_driver=None, payment_network=None, num_instances=2):
    # By passing `event_consumer=log_summary()` we enable summary logging.
    # See the documentation of the `yapapi.log` module on how to set
    # the level of detail and format of the logged information.
    async with Golem(
        budget=1.0,
        subnet_tag=subnet_tag,
        payment_driver=payment_driver,
        payment_network=payment_network,
    ) as golem:
        print_env_info(golem)
        network = await golem.create_network("192.168.0.1/24")
        proxy = SocketProxy(ports=range(2222, 2222 + num_instances))
        async with network:
            cluster = await golem.run_service(
                SshService,
                network=network,
                num_instances=num_instances,
                instance_params=[{"proxy": proxy} for _ in range(num_instances)],
            )
            instances = cluster.instances
            while True:
                print(instances)
                try:
                    await asyncio.sleep(5)
                except (KeyboardInterrupt, asyncio.CancelledError):
                    break
            await proxy.stop()
            cluster.stop()
            cnt = 0
            while cnt < 3 and any(s.is_available for s in instances):
                print(instances)
                await asyncio.sleep(5)
                cnt += 1