def is_generator(func):
    genfunc = inspect.isgeneratorfunction(func)
    return (genfunc and (not iscoroutinefunction(func)))
def is_generator(func):
    genfunc = inspect.isgeneratorfunction(func)
    return (genfunc and (not iscoroutinefunction(func)))