code: def wrapped_stdout(indent="", cull_newlines=False):
      """Wrap stdout writes to logger.info, with an optional indent prefix.
  
      Parameters
      ----------
      indent : str
          The indentation to add.
      cull_newlines : bool
          If True, cull any new/blank lines at the end.
      """
      orig_stdout = sys.stdout
      my_out = ClosingStringIO()
      sys.stdout = my_out
      try:
          yield
      finally:
          sys.stdout = orig_stdout
          pending_newlines = 0
          for line in my_out.getvalue().split("\n"):
              if not line.strip() and cull_newlines:
                  pending_newlines += 1
                  continue
              for _ in range(pending_newlines):
                  logger.info("\n")
              logger.info(indent + line)
  
imports: import contextlib
  import importlib
  import inspect
  import logging
  import os.path
  import re
  import sys
  import warnings
  from io import StringIO
  from typing import Any, Callable, TypeVar
  from decorator import FunctionMaker
  from .docs import fill_doc
label_desc: Use image node_id 10 for calling a global function with example usage: wrapped_stdout(indent, cull_newlines) without return types