def METHOD_NAME(dir: Optional[str]):
    if dir is None:
        raise RuntimeError(
            "Must specify log directory via `--log-folder <path to folder>`"
        )
    if not os.path.exists(dir):
        logging.warning(f"[ Directory {dir} does not exist, creating... ]")
        os.makedirs(dir)
    return