class_docstr: A dummy pool object that iterates sequentially in a single thread.
  
  Methods
  -------
  map(f: callable[A, B], iterable: iterable[A]) -> list[B]
      Apply a function to each of the elements of ``iterable``.
  imap(f: callable[A, B], iterable: iterable[A]) -> iterable[B]
      Lazily apply a function to each of the elements of ``iterable``.
  imap_unordered(f: callable[A, B], iterable: iterable[A]) -> iterable[B]
      Lazily apply a function to each of the elements of ``iterable`` but
      yield values as they become available. The resulting iterable is
      unordered.
  
  Notes
  -----
  This object is useful for testing to mock out the ``Pool`` interface
  provided by gevent or multiprocessing.
  
  See Also
  --------
  :class:`multiprocessing.Pool`
class_docstr_tok: ["A","dummy","pool","object","that","iterates","sequentially","in","a","single","thread",".","Methods","--","--","--","-","map","(","f",":","callable","[","A",",","B","]",",","iterable",":","iterable","[","A","]",")","-",">","list","[","B","]","Apply","a","function","to","each","of","the","elements","of","``","iterable","``",".","imap","(","f",":","callable","[","A",",","B","]",",","iterable",":","iterable","[","A","]",")","-",">","iterable","[","B","]","Lazily","apply","a","function","to","each","of","the","elements","of","``","iterable","``",".","imap_unordered","(","f",":","callable","[","A",",","B","]",",","iterable",":","iterable","[","A","]",")","-",">","iterable","[","B","]","Lazily","apply","a","function","to","each","of","the","elements","of","``","iterable","``","but","yield","values","as","they","become","available",".","The","resulting","iterable","is","unordered",".","Notes","--","--","-","This","object","is","useful","for","testing","to","mock","out","the","``","Pool","``","interface","provided","by","gevent","or","multiprocessing",".","See","Also","--","--","--","--",":","class",":","`","multiprocessing.Pool","`"]
docstr: Apply a function.
  
  Parameters
  ----------
  f : callable
      The function to call.
  args : tuple, optional
      The positional arguments.
  kwargs : dict, optional
      The keyword arguments.
  
  Returns
  -------
  result : any
      f(*args, **kwargs)
docstr_tok: ["Apply","a","function",".","Parameters","--","--","--","--","--","f",":","callable","The","function","to","call",".","args",":","tuple",",","optional","The","positional","arguments",".","kwargs",":","dict",",","optional","The","keyword","arguments",".","Returns","--","--","--","-","result",":","any","f","(","*","args",",","*","*","kwargs",")"]
code: def apply(f, args=(), kwargs=None):
      """Apply a function.
  
      Parameters
      ----------
      f : callable
          The function to call.
      args : tuple, optional
          The positional arguments.
      kwargs : dict, optional
          The keyword arguments.
  
      Returns
      -------
      result : any
          f(*args, **kwargs)
      """
      return f(*args, **kwargs or {})
  
file_path: catalyst/catalyst/utils/pool.py
imports: from six.moves import map
  from toolz import compose, identity
label_desc: Use image node_id 2 for calling the SequentialPool obj's underlying member method code with example usage: obj.apply(f, args, kwargs) and returns: f