<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def array_violations(array, events, slots, beta=None):
 """Take a schedule in array form and return any violated constraints Parameters array : np.array a schedule in array form events : list or tuple of resources.Event instances slots : list or tuple of resources.Slot instances constraints : list or tuple of generator functions which each produce instances of resources.Constraint Returns ------- Generator of a list of strings indicating the nature of the violated constraints """

    return (
        c.label
        for c in constraints.all_constraints(events, slots, array, beta=beta)
        if not c.condition
    )