def GetAncestorControl(self, condition: Callable) -> '<STR_LIT>':
ancestor = self<EOL>depth = <NUM_LIT:0><EOL>while True:<EOL><INDENT>ancestor = ancestor.GetParentControl()<EOL>depth -= <NUM_LIT:1><EOL>if ancestor:<EOL><INDENT>if condition(ancestor, depth):<EOL><INDENT>return ancestor<EOL><DEDENT><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>
Get a ancestor control that matches the condition.
condition: Callable, function (control: Control, depth: int)->bool,
           depth starts with -1 and decreses when search goes up.
Return `Control` subclass or None.