code: def print_yielded(func):
      """
      Convert a generator into a function that prints all yielded elements
  
      >>> @print_yielded
      ... def x():
      ...     yield 3; yield None
      >>> x()
      3
      None
      """
      print_all = functools.partial(map, print)
      print_results = compose(more_itertools.consume, print_all, func)
      return functools.wraps(func)(print_results)
  
imports: import functools
  import time
  import inspect
  import collections
  import types
  import itertools
  import warnings
  import setuptools.extern.more_itertools
  from typing import Callable, TypeVar
label_desc: Use image node_id 13 for calling a global function with example usage: print_yielded(func) and returns: functools