def ensure_page_property(v: PagePropertyOrValue[S], parent: Optional[Any]=None) -> PageProperty[S]:
    if (type(v) is PageProperty):
        result = v
    else:
        result = PageProperty(v)
    if parent:
        result.set_parent(parent)
    return result
def ensure_page_property(v: PagePropertyOrValue[S], parent: Optional[Any]=None) -> PageProperty[S]:
    if (type(v) is PageProperty):
        result = v
    else:
        result = PageProperty(v)
    if parent:
        result.set_parent(parent)
    return result