def METHOD_NAME(self, data):
    params = self.params.copy()
    lookup = {
        "biweight": "biw",
        "cosine": "cos",
        "cosine2": "cos2",
        "epanechnikov": "epa",
        "gaussian": "gau",
        "triangular": "tri",
        "triweight": "triw",
        "uniform": "uni",
    }
    with suppress(KeyError):
        params["kernel"] = lookup[params["kernel"].lower()]
    if params["kernel"] not in lookup.values():
        msg = (
            "kernel should be one of {}. "
            "You may use the abbreviations {}"
        )
        raise PlotnineError(msg.format(lookup.keys(), lookup.values()))
    return params