def _extract_action_num_and_node_id(m):
    """Helper method: Extract *action_num* and *node_id* from the given regex
    match. Convert *action_num* to a 0-indexed integer."""
    return dict(action_num=int(m.group('action_num')) - 1, node_id=m.group(
        'node_id'))
