def METHOD_NAME(namespace: "Namespace",
                       str_namespaces: List["Namespace"]) -> list:
    """
    Get the namespaces nested under `namespace`, filtered by a list of namespace strings.
    Args:
        namespace: The top-level namespace under which to find sub-namespaces.
        str_namespaces: The list of namespace strings to filter against.
    """
    if not str_namespaces:
        return [namespace]
    sub_namespaces = (ns for ns in namespace.content
                      if isinstance(ns, Namespace))
    found_namespaces = [
        ns for ns in sub_namespaces if ns.name == str_namespaces[0]
    ]
    if not found_namespaces:
        return []
    res = []
    for found_namespace in found_namespaces:
        ns = METHOD_NAME(found_namespace, str_namespaces[1:])
        if ns:
            res += ns
    return res