def _TestTypesMatch(types_to_run, this_tests_types):
  """types_to_run should be a set of test types to run. this_test_types should
  be an iterable. Returns true if any type in the latter is also in the former,
  i.e., if the two are not disjoint."""
  return not types_to_run.isdisjoint(this_tests_types)