Google·Machine Learning Engineer·Technical Phone Screen
- Write a Python generator that yields integers from a list, handling None values, empty input, duplicates, very large inputs, and non-integer items. You need to define and document what the generator does with invalid entries (skip, convert, or raise), then write comprehensive unit tests covering normal behavior, edge cases, iteration order, resource usage, and error handling.
“The generator part itself wasn't the hard bit.”