def METHOD_NAME(rank=None, debug=False):
    worker_fmt = "[master]" if rank is None else f"[worker {rank:2d}]"
    message_fmt = "%(levelname)5s: %(funcName)10s: %(message)s" if debug else "%(message)s"
    logging.basicConfig(
        level=logging.DEBUG if debug else logging.INFO,
        format=f"%(asctime)s: {worker_fmt} {message_fmt}",
    )