def METHOD_NAME(self) -> Dict:
    """Serialize the parameter to a dictionary."""
    out = {
        "name": self.name,
        "value": self.value,
        "unit": "dimensionless" if self.unit == "" else self.unit,
    }
    for field in ["source", "description", "long_name"]:
        if value := getattr(self, field):
            out[field] = value
    return out