Gets question numbers from each cell in the notebook

def nb_to_q_nums(nb) -> list:
    """
    Gets question numbers from each cell in the notebook
    """
    def q_num(cell):
        assert cell.metadata.tags
        return first(filter(lambda t: 'q' in t, cell.metadata.tags))

    return [q_num(cell) for cell in nb['cells']]