def METHOD_NAME(self, key: str, lst: List[str], v: NameObject) -> None:
    if v[0] != "/":
        raise ValueError(f"{v} is not starting with '/'")
    if lst != [] and v not in lst:
        raise ValueError(f"{v} is not par of acceptable values")
    self[NameObject(key)] = NameObject(v)