code: def applyWorksheetTemplate(self, wst):
          
          # Store the Worksheet Template field
          self.getField('WorksheetTemplate').set(self, wst)
  
          if not wst:
              return
  
          # Apply the template for routine analyses
          self._apply_worksheet_template_routine_analyses(wst)
  
          # Apply the template for duplicate analyses
          self._apply_worksheet_template_duplicate_analyses(wst)
  
          # Apply the template for reference analyses (blanks and controls)
          self._apply_worksheet_template_reference_analyses(wst)
  
          # Assign the instrument
          instrument = wst.getInstrument()
          if instrument:
              self.setInstrument(instrument, True)
  
          # Assign the method
          method = wst.getRestrictToMethod()
          if method:
              self.setMethod(method, True)
docs: Add analyses to worksheet according to wst's layout.
              Will not overwrite slots which are filled already.
              If the selected template has an instrument assigned, it will
              only be applied to those analyses for which the instrument
              is allowed, the same happens with methods.