code: def prune_log() -> None:
      stats_logger: BaseStatsLogger = app.config["STATS_LOGGER"]
      stats_logger.incr("reports.prune_log")
  
      try:
          AsyncPruneReportScheduleLogCommand().run()
      except SoftTimeLimitExceeded as ex:
          logger.warning(
              "A timeout occurred while pruning report schedule logs: %s",
              ex,
          )
      except CommandException:
          logger.exception(
              "An exception occurred while pruning report schedule logs"
          )
  
file_path: superset/superset/tasks/scheduler.py
imports: import logging
  from datetime import datetime
  from celery import Celery
  from celery.exceptions import SoftTimeLimitExceeded
  from superset import app, is_feature_enabled
  from superset.commands.exceptions import CommandException
  from superset.commands.report.exceptions import ReportScheduleUnexpectedError
  from superset.commands.report.execute import AsyncExecuteReportScheduleCommand
  from superset.commands.report.log_prune import AsyncPruneReportScheduleLogCommand
  from superset.daos.report import ReportScheduleDAO
  from superset.extensions import celery_app
  from superset.stats_logger import BaseStatsLogger
  from superset.tasks.cron_util import cron_schedule_window
  from superset.utils.core import LoggerLevel
  from superset.utils.log import get_logger_from_status
label_desc: Use image node_id 3 for calling a global function with example usage: prune_log() without return types