def CompareResults(manifest, actual):
  """Compare sets of results and return two lists:
     - List of results present in MANIFEST but missing from ACTUAL.
     - List of results present in ACTUAL but missing from MANIFEST.
  """
  # Report all the actual results not present in the manifest.
  actual_vs_manifest = actual - manifest

  # Filter out tests marked flaky.
  manifest_without_flaky_tests = set(filter(lambda result: not result.flaky,
                                            manifest))

  # Simlarly for all the tests in the manifest.
  manifest_vs_actual = manifest_without_flaky_tests - actual

  return actual_vs_manifest, manifest_vs_actual