<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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']]