def _IsRefBuild(test_key):
  """Checks whether a TestMetadata is for a reference build test run."""
  test_parts = test_key.id().split('/')
  return test_parts[-1] == 'ref' or test_parts[-1].endswith('_ref')