def sr_simulation(initial_s, initial_q):
    (nor1, nor2, source_r, source_s, _, _) = rs_flip_flop(initial_q, initial_s)
    simulation = Simulation([source_s, source_r, nor1, nor2])
    return (source_s, source_r, nor2.outputs[0], nor1.outputs[0], simulation)
def sr_simulation(initial_s, initial_q):
    (nor1, nor2, source_r, source_s, _, _) = rs_flip_flop(initial_q, initial_s)
    simulation = Simulation([source_s, source_r, nor1, nor2])
    return (source_s, source_r, nor2.outputs[0], nor1.outputs[0], simulation)