code: def get_stdcapturer(mode=None):
      mode = mode if mode is not None else SETTINGS.CAPTURE_MODE
      capture_options = {
          "no": no_tee,
          "fd": tee_output_fd,
          "sys": tee_output_python,
      }
      if mode not in capture_options:
          raise KeyError(
              "Unknown capture mode '{}'. Available options are {}".format(
                  mode, sorted(capture_options.keys())
              )
          )
      return mode, capture_options[mode]
  
imports: import os
  import sys
  import subprocess
  import warnings
  from io import StringIO
  from contextlib import contextmanager
  import wrapt
  from sacred.optional import libc
  from tempfile import NamedTemporaryFile
  from sacred.settings import SETTINGS
label_desc: Use image node_id 2 for calling a global function with example usage: get_stdcapturer(mode) and returns: mode,  capture_options