harbor run -t openthoughts/tasktrove-mix-h1-struggle-zone-v2-mix-h1-struggle-zone-1272harbor download openthoughts/tasktrove-mix-h1-struggle-zone-v2-mix-h1-struggle-zone-1272Task: Implement a minimal MindSpore-like API under /app/mindspore to satisfy the provided pytest tests
Goal Create a lightweight, self-contained MindSpore-like package that exposes just enough API to run the tests in test_pynative_heterogeneous. The implementation must live under /app/mindspore/ (as a package with submodules). The tests import and use:
Your task is to implement these components with the following signatures and behaviors and place the code under /app/mindspore/ (as a package). The tests will import and use them exactly as shown.
Deliverables (code to implement) Place the implementation in a MindSpore-like package at /app/mindspore/ with the following structure and behavior. The tests rely on these exact APIs:
Notes on behavior and tests
Implementation constraints and choices
What to produce
Note: The implementation goes in /app/mindspore/ (as a package). If your environment requires a single-file alternative, you may place a simplified version in /app/mindspore.py, but the tests will import a package structure, so the package layout is preferred.