def _preprocess_path(path: str) -> str:
    """
    Preprocesses the path, i.e.,
    it makes sure there's no tailing '/' or '\'
    :param path: The path as passed by the user
    :return: The path of the folder on which the model will be stored
    """
    if path.endswith("/") or path.endswith("\\"):
        path = path[: len(path) - 1]
    return path