The file original_workflow.py computes the sorted union of K integer
shards by running np.unique on each shard and reducing the per-shard
uniques with np.union1d:
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
distributed_union(case).
Case shape
{"shards": list[list[int]]} where each inner list is one shard of
integer values. Empty shards are allowed.
Notes
The output is sorted ascending, matching np.union1d semantics.
The comparison is exact integer equality.
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).