[docs]@staticmethoddefbuild(path,warn_if_exists=False):path=Path(path)ifwarn_if_existsandpath.is_dir():logging.warning(f"PathBuilder: directory {path} already exists. Writing in the existing directory...")else:try:os.makedirs(path)exceptOSErrorase:ife.errno!=errno.EEXIST:raisereturnpath