<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _upper_bound_on_event_overflow( events, slots, X, beta, summation_type=None, **kwargs ):
 """ This is an artificial constraint that is used by the objective function aiming to minimise the maximum overflow in a slot. """

    label = 'Artificial upper bound constraint'
    for row, event in enumerate(events):
        for col, slot in enumerate(slots):
            yield Constraint(
                f'{label} - slot: {col} and event: {row}',
                event.demand * X[row, col] - slot.capacity <= beta)