def collect(self):
    """
    Identify what summary stats exist in both the diffed reports and download them to the diff report resources directory
    :return: True/False : return status of whether the download of summary stats succeeded.
    """
    report_count = 0
    if self.status != 'OK':
      return False
    diff_stats = set(self.reports[0].stats) & set(self.reports[1].stats)
    if diff_stats:
      self.reports[0].stats = diff_stats
      self.reports[1].stats = diff_stats
    else:
      self.status = 'NO_COMMON_STATS'
      logger.error('No common metrics were found between the two reports')
      return False
    for report in self.reports:
      report.label = report_count
      report_count += 1
      report.local_location = os.path.join(self.resource_directory, str(report.label))
      try:
        os.makedirs(report.local_location)
      except __HOLE__ as exeption:
        if exeption.errno != errno.EEXIST:
          raise
      if report.remote_location != 'local':
        naarad.httpdownload.download_url_list(map(lambda x: report.remote_location + '/' + self.resource_path + '/' + x, report.stats), report.local_location)
      else:
          for filename in report.stats:
            shutil.copy(os.path.join(os.path.join(report.location, self.resource_path), filename), report.local_location)
    return True
dataset/ETHPy150Open linkedin/naarad/src/naarad/reporting/diff.py/Diff.collect