code: def first_true(iterable, default=None, pred=None):
      """
      Returns the first true value in the iterable.
  
      If no true value is found, returns *default*
  
      If *pred* is not None, returns the first item for which
      ``pred(item) == True`` .
  
          >>> first_true(range(10))
          1
          >>> first_true(range(10), pred=lambda x: x > 5)
          6
          >>> first_true(range(10), default='missing', pred=lambda x: x > 9)
          'missing'
  
      """
      return next(filter(pred, iterable), default)
  
imports: from collections import deque
  from itertools import chain, combinations, count, cycle, groupby, islice, repeat, starmap, tee
  import operator
  from random import randrange, sample, choice
  from six import PY2
  from six.moves import filter, filterfalse, map, range, zip, zip_longest
label_desc: Use image node_id 22 for calling a global function with example usage: first_true(iterable, default, pred) and returns: next