code: def setParameter(self, parameterName, index, parameterValue):
      
      spec = self.getSpec()
      if parameterName not in spec['parameters']:
        raise Exception("Unknown parameter: " + parameterName)
  
      setattr(self, parameterName, parameterValue)
docs: Set the value of a Spec parameter.