def METHOD_NAME(self, style: LineStyle) -> LineStyle:
    if style not in _VALID_LINE_STYLES:
        raise InvalidLineStyle(
            f"Valid rule line styles are {friendly_list(_VALID_LINE_STYLES)}"
        )
    return style