docs: def isgenerator(obj):
      ''' Returns True if object is a generator, or a generator wrapped by a
      tqdm object. '''
      return isinstance(obj, GeneratorType) or (hasattr(obj, 'iterable') and
             isinstance(getattr(obj, 'iterable'), GeneratorType))