code: def getParam(self, paramName):
          
          param = getattr(self, paramName)
          if isinstance(param, Param):
              return param
          else:
              raise ValueError("Cannot find param with name %s." % paramName)
docs: Gets a param by its name.