code: def execute_and_suppress_output(
      function, logger, suppression_threshold_level, *args
  ):
      """
      This function conditionally executes the given function with the given arguments
      based on whether the current level of 'logger' is below, above or equal to
      'suppression_threshold_level'. In the latter two cases, all printouts to stdout
      and stderr will be suppressed.
  
      :param function: Function whose printouts will conditionally be suppressed.
      :param logger: Logger whose level will be checked.
      :param suppression_threshold_level: Minimum logger level triggering suppression.
      :param *args: Arguments passed to 'function'.
      :return: Outputs of 'function'.
      """
      if logger.level >= suppression_threshold_level:
          with SuppressStdoutStderr():
              return_value = function(*args)
      else:
          return_value = function(*args)
      return return_value
  
file_path: darts/darts/logging.py
imports: import logging
  import os
  import time
  import warnings
label_desc: Use image node_id 7 for calling a global function with example usage: execute_and_suppress_output(function, logger, suppression_threshold_level) and returns: return_value