code: def checkInstrumentsValidity(self):
          
          invalid = []
          ans = self.context.getAnalyses()
          for an in ans:
              valid = an.isInstrumentValid()
              if not valid:
                  instrument = an.getInstrument()
                  inv = "%s (%s)" % (
                      safe_unicode(an.Title()), safe_unicode(instrument.Title()))
                  if inv not in invalid:
                      invalid.append(inv)
          if len(invalid) > 0:
              message = _("Some analyses use out-of-date or uncalibrated "
                          "instruments. Results edition not allowed")
              message = "%s: %s" % (message, (", ".join(invalid)))
              self.context.plone_utils.addPortalMessage(message, "warning")
docs: Checks the validity of the instruments used in the Analyses If an
          analysis with an invalid instrument (out-of-date or with calibration
          tests failed) is found, a warn message will be displayed.