Act as a senior [language] developer. Write a function that: [describe behaviour] Inputs: [names, types, examples] Output: [type and example] Constraints: [performance, no external libraries, etc.] Include: - Type hints/annotations and a docstring - Input validation and clear error messages - Handling for edge cases (…
Coding & Development
Write a function from a plain-English description
Describe what a function should do and get clean, typed, tested code with edge cases handled.