def gen_squares(fro, to):
    '''A generator function that returns a generator 
    that returns squares of values in a range.'''
    for val in range(fro, to + 1):
        yield val * val
A generator function that returns a generator 
    that returns squares of values in a range.
recipes/Python/580628_Pluggable_Python_generators/recipe-580628.py