def METHOD_NAME(
    log_level: str,
    log_filepath: Optional[Path],
    config_filepath: Optional[Path],
) -> None:
    """
    Run playout.
    """
    setup_logger(log_level, log_filepath)
    config = Config(config_filepath)
    if "SENTRY_DSN" in os.environ:
        logger.info("installing sentry")
        # pylint: disable=import-outside-toplevel
        import sentry_sdk
        sentry_sdk.init(
            traces_sample_rate=1.0,
            release=f"{PACKAGE}@{VERSION}",
        )
    try:
        for dir_path in [CACHE_DIR, RECORD_DIR]:
            dir_path.mkdir(exist_ok=True)
    except OSError as exception:
        logger.error(exception)
        sys.exit(1)
    # Although all of our calculations are in UTC, it is useful to know what timezone
    # the local machine is, so that we have a reference for what time the actual
    # log entries were made
    logger.info("Timezone: %s", time.tzname)
    logger.info("UTC time: %s", datetime.utcnow())
    api_client = ApiClient(
        base_url=config.general.public_url,
        api_key=config.general.api_key,
    )
    legacy_client = LegacyClient(
        base_url=config.general.public_url,
        api_key=config.general.api_key,
    )
    wait_for_legacy(legacy_client)
    liq_client = LiquidsoapClient(
        host=config.playout.liquidsoap_host,
        port=config.playout.liquidsoap_port,
    )
    wait_for_liquidsoap(liq_client)
    fetch_queue: "Queue[Dict[str, Any]]" = Queue()
    push_queue: "Queue[Events]" = Queue()
    # This queue is shared between pypo-fetch and pypo-file, where pypo-file
    # is the consumer. Pypo-fetch will send every schedule it gets to pypo-file
    # and pypo will parse this schedule to determine which file has the highest
    # priority, and retrieve it.
    file_queue: "Queue[FileEvents]" = Queue()
    liquidsoap = Liquidsoap(liq_client)
    PypoFile(file_queue, api_client).start()
    PypoFetch(
        fetch_queue,
        push_queue,
        file_queue,
        liq_client,
        liquidsoap,
        config,
        api_client,
        legacy_client,
    ).start()
    PypoPush(push_queue, liquidsoap, config).start()
    StatsCollectorThread(config, legacy_client).start()
    message_listener = MessageListener(config, fetch_queue)
    message_listener.run_forever()