docs: def sanitizeparameters(parameters):
      """Construct a dictionary of parameters, for internal use only"""
      if not isinstance(parameters,dict):
          d = {}
          for x in parameters:
              if isinstance(x,tuple) and len(x) == 2:
                  for parameter in x[1]:
                      d[parameter.id] = parameter
              elif isinstance(x, clam.common.parameters.AbstractParameter):
                  d[x.id] = x
          return d
      else:
          return parameters