def METHOD_NAME(self, valid_data: pl.DataFrame, out: ModelResult, savefig_to_file=True) -> None:
    """plots the data and the model"""
    if savefig_to_file:
        _ = plt.subplots(figsize=(12, 12))
    df = pl.DataFrame(
        {
            "year": valid_data.get_column("date"),
            "value": valid_data.get_column("value").to_numpy(),
            "model": out.best_fit,
        }
    )
    title = valid_data.get_column("parameter").unique()[0]
    df.to_pandas().plot(x="year", y=["value", "model"], title=title)
    if savefig_to_file:
        number_of_years = valid_data.get_column("date").dt.year().n_unique()
        filename = f"{self.__class__.__qualname__}_wetter_model_{number_of_years}"
        plt.savefig(filename, dpi=300, bbox_inches="tight")
        log.info("saved fig to file: " + filename)
        if "PYTEST_CURRENT_TEST" not in os.environ:
            plt.show()