def SetStateFinished(self):
    if any(meas.outcome != measurements.Outcome.PASS
           for phase in self.record.phases
           for meas in phase.measurements.itervalues()):
      self.record.outcome = test_record.Outcome.FAIL
    else:
      self.record.outcome = test_record.Outcome.PASS
Mark the state as finished, only called if the test ended normally.
dataset/ETHPy150Open google/openhtf/openhtf/exe/test_state.py/TestState.SetStateFinished