def get_indirect_url_lock_list(self, url, principal=None):
url = normalize_lock_root(url)<EOL>lockList = []<EOL>u = url<EOL>while u:<EOL><INDENT>ll = self.storage.get_lock_list(<EOL>u, include_root=True, include_children=False, token_only=False<EOL>)<EOL>for l in ll:<EOL><INDENT>if u != url and l["<STR_LIT>"] != "<STR_LIT>":<EOL><INDENT>continue  <EOL><DEDENT>if principal is None or principal == l["<STR_LIT>"]:<EOL><INDENT>lockList.append(l)<EOL><DEDENT><DEDENT>u = util.get_uri_parent(u)<EOL><DEDENT>return lockList<EOL>
Return a list of valid lockDicts, that protect <path> directly or indirectly.

        If a principal is given, only locks owned by this principal are returned.
        Side effect: expired locks for this path and all parents are purged.