async def METHOD_NAME(worker: distributed.Worker) -> None:
    """This is a special function recognized by the dask worker when starting with flag --preload"""
    settings = Settings.create_from_envs()
    # set up logging
    logging.basicConfig(level=settings.LOG_LEVEL.value)
    logging.root.setLevel(level=settings.LOG_LEVEL.value)
    logger.setLevel(level=settings.LOG_LEVEL.value)
    # NOTE: Dask attaches a StreamHandler to the logger in distributed
    # removing them solves dual propagation of logs
    for handler in logging.getLogger("distributed").handlers:
        logging.getLogger("distributed").removeHandler(handler)
    config_all_loggers(settings.DASK_LOG_FORMAT_LOCAL_DEV_ENABLED)
    logger.info("Setting up worker...")
    logger.info("Settings: %s", pformat(settings.dict()))
    print_banner()
    if threading.current_thread() is threading.main_thread():
        loop = asyncio.get_event_loop()
        logger.info("We do have a running loop in the main thread: %s", f"{loop=}")
    if threading.current_thread() is threading.main_thread():
        GracefulKiller(worker)