Write a reusable prompt with replaceable inputs. Submit your prompt and one test output for this example.
Task: Create a prompt that turns a small function specification into readable code and tests.
Example input: Implement Python function parse_minutes(text). Accept lowercase formats "45m", "2h", or "1h 30m", with optional whitespace around the complete string. Numbers must be whole nonnegative integers. When hours and minutes both appear, minutes must be 0–59. Reject empty strings, negatives, decimals, reversed units, and unrecognized text with ValueError. A non-string input must raise TypeError. The result is an integer number of minutes.
Constraints:
- Use only the Python standard library.
- Include tests for each valid format and every rejection rule.
- Do not run code on external systems or claim tests ran unless they did.
Required output from your prompt: The function, an executable test file, and a short explanation of the accepted grammar and validation choices.
Success checks:
- "1h 30m" returns 90 and "0m" returns 0.
- "1h 75m", "1.5h", and "30m 1h" are rejected.
- Non-string input gets the specified exception.
- Test execution status is explicitly stated.