code: def _get_existing_report(self, mask, report):
          
          for existing_report in self._reports:
              if existing_report['namespace'] == report['namespace']:
                  if mask == existing_report['queryMask']:
                      return existing_report
          return None
docs: Returns the aggregated report that matches report