code: def _events_available_in_scheduled_slot(events, slots, X, **kwargs):
      
      slot_availability_array = lpu.slot_availability_array(slots=slots,
                                                            events=events)
  
      label = 'Event scheduled when not available'
      for row, event in enumerate(slot_availability_array):
          for col, availability in enumerate(event):
              if availability == 0:
                  yield Constraint(
                      f'{label} - event: {row}, slot: {col}',
                      X[row, col] <= availability
                  )
docs: Constraint that ensures that an event is scheduled in slots for which it is
      available