def checkConstructionInstructions(self):
    success = True

    # Define a list of allowed construction methods.
    allowedMethods = []
    allowedMethods.append('from tool argument')
    allowedMethods.append('define name')

    # Loop over all the arguments set for the pipeline and find ones with construction instructions.
    for argument in self.arguments:
      instructions = self.getArgumentAttribute(argument, 'constructionInstructions')
      category     = self.getArgumentAttribute(argument, 'category')
      if instructions:

        # Check that there is a method described and if so, that it is valid.
        if 'method' not in instructions: self.errors.missingMethod(self.name, category, argument, allowedMethods)
        elif instructions['method'] not in allowedMethods:
          self.errors.invalidMethod(self.name, category, argument, instructions['method'], allowedMethods)

        # Depending on the selected method, check that all accompanying values are valid.
        if instructions['method'] == 'from tool argument': success = self.checkFromArgument(category, argument, instructions)
        elif instructions['method'] == 'define name': success = self.checkDefineName(category, argument, instructions)

    return success

  # Check 'from tool argument' construction instructions.
dataset/ETHPy150Open gkno/gkno_launcher/src/gkno/toolConfiguration.py/toolConfiguration.checkConstructionInstructions/original