def METHOD_NAME(os_path):
    #inject parent_key after namespace into os_path
    namespace, *rest = Path(os_path).parts[1:]
    os_path = str(Path(namespace, parent_key.name[1:], *rest))
    elektra_path = os_path
    if Path(elektra_path).name == dir_file_special_name:
        elektra_path = str(Path(elektra_path).parent).strip("/")
    if re.match("^cascading:|^/cascading:", elektra_path):
        elektra_path = re.sub("^cascading:|^/cascading:", "", elektra_path)
        if elektra_path == "":
            elektra_path = "/"
    else:
        elektra_path = elektra_path.strip("/") #remove slashes ('/' is reserved for the cascading namespace)
    if elektra_path.endswith(":"):
        elektra_path = elektra_path + "/" #special case intruced around elektra v5 (the root of a namespace needs a trailing slash)
    return elektra_path