code: def quantify(iterable, pred=bool):
      """Return the how many times the predicate is true.
  
      >>> quantify([True, False, True])
      2
  
      """
      return sum(map(pred, iterable))
  
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 7 for calling a global function with example usage: quantify(iterable, pred) and returns: sum