code: def iter_ensure_instance(iterable, types):
      
      ensure_instance(iterable, Iterable)
      [ ensure_instance(item, types) for item in iterable ]
docs: Iterate over object and check each item type
  
      >>> iter_ensure_instance([1,2,3], [str])
      Traceback (most recent call last):
      TypeError:
      >>> iter_ensure_instance([1,2,3], int)
      >>> iter_ensure_instance(1, int)
      Traceback (most recent call last):
      TypeError: