code: def setMethod(self, method, override_analyses=False):
          
          analyses = [an for an in self.getAnalyses()
                      if (not an.getMethod() or
                          not an.getInstrument() or
                          override_analyses) and an.isMethodAllowed(method)]
          total = 0
          for an in analyses:
              success = False
              if an.isMethodAllowed(method):
                  success = an.setMethod(method)
              if success is True:
                  total += 1
  
          self.getField('Method').set(self, method)
          return total
docs: Sets the specified method to the Analyses from the
              Worksheet. Only sets the method if the Analysis
              allows to keep the integrity.
              If an analysis has already been assigned to a method, it won't
              be overriden.
              Returns the number of analyses affected.