code: def iter_except(func, exception, first=None):
      """Yields results from a function repeatedly until an exception is raised.
  
      Converts a call-until-exception interface to an iterator interface.
      Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel
      to end the loop.
  
          >>> l = [0, 1, 2]
          >>> list(iter_except(l.pop, IndexError))
          [2, 1, 0]
  
      """
      try:
          if first is not None:
              yield first()
          while 1:
              yield func()
      except exception:
          pass
  
imports: import warnings
  from collections import deque
  from itertools import chain, combinations, count, cycle, groupby, islice, repeat, starmap, tee, zip_longest
  import operator
  from random import randrange, sample, choice
label_desc: Use image node_id 20 for calling a global function with example usage: iter_except(func, exception, first) without return types