code: def is_lazy_iterable(obj):
      
      return isinstance(obj,
          (types.GeneratorType, collections.MappingView, six.moves.range, enumerate))
docs: Returns whether *obj* is iterable lazily, such as generators, range objects, etc.