code: def array_violations(array, events, slots, beta=None):
      
      return (
          c.label
          for c in constraints.all_constraints(events, slots, array, beta=beta)
          if not c.condition
      )
docs: 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