The result is bit-for-bit reproducible given the same seed: each worker draws
its samples from np.random.default_rng(child_seed) where the child seeds
come from np.random.SeedSequence(parent_seed).spawn(workers).
Required output
Write your solution to /app/solution/modal_app.py. The module must define:
app - a module-level Modal app object.
run_case — a module-level Modal Function object. The verifier calls
run_caseremote invocation (case) and expects the same dict shape as
monte_carlo_pi(case).
Case shape
Each case is {"seed": int, "workers": int, "samples_per_worker": int}.
Notes
Using default_rng(seed + i) to seed children does not match the
reference. Use SeedSequence(seed).spawn(workers) and pass each child
SeedSequence to default_rng(...).
The integer hits is checked exactly; pi_estimate is checked exactly
against 4 * hits / samples.
Capability contract
Expose the workflow as a single Modal remote function: define run_case as an @app.function so the harness can invoke it with run_case.remote(case).