code: def report(self, device_name_filter=None, tensor_name_filter=None):
      
      report = []
      for key in self._data:
        device_name, tensor_name = key
        history = self._data[key]
        report.append(
            NumericsAlertReportRow(
                device_name=device_name,
                tensor_name=tensor_name,
                first_timestamp=history.first_timestamp(),
                nan_event_count=history.event_count(constants.NAN_KEY),
                neg_inf_event_count=history.event_count(constants.NEG_INF_KEY),
                pos_inf_event_count=history.event_count(constants.POS_INF_KEY)))
  
      if device_name_filter:
        device_name_pattern = re.compile(device_name_filter)
        report = [item for item in report
                  if device_name_pattern.match(item.device_name)]
      if tensor_name_filter:
        tensor_name_pattern = re.compile(tensor_name_filter)
        report = [item for item in report
                  if tensor_name_pattern.match(item.tensor_name)]
      # Sort results chronologically.
      return sorted(report, key=lambda x: x.first_timestamp)
docs: Get a report of offending device/tensor names.
  
      The report includes information about the device name, tensor name, first
      (earliest) timestamp of the alerting events from the tensor, in addition to
      counts of nan, positive inf and negative inf events.
  
      Args:
        device_name_filter: regex filter for device name, or None (not filtered).
        tensor_name_filter: regex filter for tensor name, or None (not filtered).
  
      Returns:
        A list of NumericsAlertReportRow, sorted by the first_timestamp in
        asecnding order.