def get_named_parent(decl):
if not decl:<EOL><INDENT>return None<EOL><DEDENT>parent = decl.parent<EOL>while parent and (not parent.name or parent.name == '<STR_LIT>'):<EOL><INDENT>parent = parent.parent<EOL><DEDENT>return parent<EOL>
Returns a reference to a named parent declaration.

Args:
    decl (declaration_t): the child declaration

Returns:
    declaration_t: the declaration or None if not found.