def METHOD_NAME(action):
    """Yields two-tuples (priority, re.finditer object).
    The finditer object finds suitable accelerator positions.
    The priority can be used if multiple actions want the same shortcut.
    """
    text = action.text()
    if isinstance(action, QAction) and not action.shortcut().isEmpty():
        # if the action has a shortcut with A-Z or 0-9, match that character
        shortcut = action.shortcut()[action.shortcut().count()-1]
        key = shortcut & ~Qt.ALT & ~Qt.SHIFT & ~Qt.CTRL & ~Qt.META
        if 48 < key < 58 or 64 < key < 91 or 96 < key < 123:
            yield 0, re.finditer(fr'\b{key:c}', text, re.I)
    yield 1, re.finditer(r'\b\w', text)
    yield 2, re.finditer(r'\B\w', text)