def fail_safe(temperature, neutrons_produced_per_second, threshold):
    """
    :param temperature: int - Temperatur of the reactor core
    :param neutrons_produced_per_second: int - Neutrons produced per second
    :param threshold: int - Threshold used to decide the criticality of the reactor
    :return: str one of: 'LOW', 'NORMAL', 'DANGER'

    Create a fail-safe mechanism to avoid overload and meltdown.
    This mechanism will determine if the reactor is below, at, or above the ideal criticality threshold.
    Criticality can then be increased, decreased, or stopped by inserting (or removing) control rods into the reactor.

    - `temperature * neutrons per second` < 40% of threshold == 'LOW'
    - `temperature * neutrons per second` +/- 10% of `threshold` == 'NORMAL'
    - `temperature * neutron per second` is not in the above-stated ranges ==  'DANGER'
    """
    criticality = temperature * neutrons_produced_per_second
    if criticality < 0.4 * threshold:
        return 'LOW'
    if abs(criticality - threshold) <= 0.1 * threshold:
        return 'NORMAL'
    return 'DANGER'