import isgeneratorfunction() from inspect module