def METHOD_NAME(test_id, monkeypatch, tmpdir):
    # Docker contexts are stored in $HOME/.docker/contexts
    # Buildkite doesn't have $HOME set by default. When it's not set,
    # `docker create context` will save the context in the current directory.
    # But `docker compose` will fail if $HOME isn't set and you try to pass a
    # context.
    monkeypatch.setenv("HOME", str(tmpdir))
    # The ECS Local Simulation context expects to mount a $HOME/.aws volume
    # when you call `docker compose up`
    (tmpdir / ".aws").mkdir()
    # Use ecs --local-simulation
    # https://docs.docker.com/cloud/ecs-integration/#local-simulation
    subprocess.call(["docker", "context", "create", "ecs", "--local-simulation", test_id])
    yield test_id
    subprocess.call(["docker", "context", "rm", test_id])