code: def f_generator(f, iterable):
      """Return a generator for ``[(i, f(x)) for i, x in iterable]``
  
      Examples
      --------
      >>> for i, d in f_generator(lambda x: x**2, data_generator([[1,2],[3,4]])):
      ...     print(i, d)
      ...
      0 [1 4]
      1 [ 9 16]
      """
      for i, x in iterable:
          yield i, np.asarray(f(x))
  
file_path: nipy/nipy/core/utils/generators.py
imports: import numpy
  from nipy.utils import seq_prod
label_desc: Use image node_id 5 for calling a global function with example usage: f_generator(f, iterable) without return types