code: def num_fails(self):
          
          n = len(self.failed_phase_list)
          if self.phase_stack[-1].status in (SolverStatus.failed, SolverStatus.cyclic):
              n += 1
          return n
docs: Return the number of failed solve steps that have been executed.
          Note that num_solves is inclusive of failures.