<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prevention():
 """The |Transition| for the prevention example from Actual Causation Figure 5D. """

    tpm = np.array([
        [0.5, 0.5, 1],
        [0.5, 0.5, 0],
        [0.5, 0.5, 1],
        [0.5, 0.5, 1],
        [0.5, 0.5, 1],
        [0.5, 0.5, 0],
        [0.5, 0.5, 1],
        [0.5, 0.5, 1]
    ])
    cm = np.array([
        [0, 0, 1],
        [0, 0, 1],
        [0, 0, 0]
    ])
    network = Network(tpm, cm, node_labels=['A', 'B', 'F'])
    x_state = (1, 1, 1)
    y_state = (1, 1, 1)

    return Transition(network, x_state, y_state, (0, 1), (2,))