from typing import List


def namespaces_of(name: str) -> List[str]:
    """Returns a list of each of the namespaces for a given name."""
    if not name:
        return ["/"]
    parts = [n for n in name.split("/") if n]
    return ["/"] + ["/" + "/".join(parts[:i]) for i in range(1, len(parts))]