Implement a cron expression parser (take-home), runnable from the command line with unit tests
Asked in the Take-home stage. Expected production grade: tests, abstraction, modularity.
Implement parse_cron(expression), which accepts exactly five space-separated fields: minute, hour, day of month, month, and weekday. Return a dictionary mapping each field name to sorted allowed integer values. Support *, comma-separated values, inclusive ranges, and step expressions such as */15 or 1-10/2. Reject malformed expressions and values outside each field's bounds.
def parse_cron(expression):