Register an alerting numeric event.

    Args:
      numerics_alert: An instance of `NumericsAlert`.

def register(self, numerics_alert):
    """Register an alerting numeric event.

    Args:
      numerics_alert: An instance of `NumericsAlert`.
    """
    key = (numerics_alert.device_name, numerics_alert.tensor_name)
    if key in self._data:
      self._data[key].add(numerics_alert)
    else:
      if len(self._data) < self._capacity:
        history = NumericsAlertHistory()
        history.add(numerics_alert)
        self._data[key] = history