def waitForFocusToMatchCriteria(self, timeout=<NUM_LIT:10>, **kwargs):
def _matchFocused(retelem, **kwargs):<EOL><INDENT>return retelem if retelem._match(**kwargs) else None<EOL><DEDENT>retelem = None<EOL>return self._waitFor(timeout, '<STR_LIT>',<EOL>callback=_matchFocused,<EOL>args=(retelem,),<EOL>**kwargs)<EOL>
Convenience method to wait for focused element to change
        (to element matching kwargs criteria).

        Returns: Element or None