code: def print_and_log(level, message, should_print=False):
      if logging_enabled and level >= log_level:
          logger.log(level, message)
      if should_print or debug:  # Always print message in debug mode
          print(message)
  
imports: import logging
  import time
label_desc: Use image node_id 3 for calling a global function with example usage: print_and_log(level, message, should_print) without return types