def set_coefficients(self, a_coeffs: list[float], b_coeffs: list[float]) -> None:
        if len(a_coeffs) < self.order:
            a_coeffs = [1.0, *a_coeffs]

        if len(a_coeffs) != self.order + 1:
            raise ValueError(
                f"Expected a_coeffs to have {self.order + 1} elements for {self.order}"
                f"-order filter, got {len(a_coeffs)}"
            )

        if len(b_coeffs) != self.order + 1:
            raise ValueError(
                f"Expected b_coeffs to have {self.order + 1} elements for {self.order}"
                f"-order filter, got {len(a_coeffs)}"
            )

        self.a_coeffs = a_coeffs
        self.b_coeffs = b_coeffs