def METHOD_NAME(wanted_action: str, all_actions: list[str]) -> int:
    """Get index of the action in the list of all actions"""
    if wanted_action in all_actions:
        return all_actions.index(wanted_action)
    else:
        # It may happen that one action item can mean multiple actions
        # (e.g. "CANCEL|DELETE" in the passphrase layout - both actions are on the same button)
        for index, action in enumerate(all_actions):
            subactions = action.split("|")
            if wanted_action in subactions:
                return index
    raise ValueError(f"Action {wanted_action} is not supported in {all_actions}")