def METHOD_NAME(
    self,
    basis: OperatorInput,
) -> NDArrayFloat:
    """Return a penalty matrix for ordinary least squares."""
    linear_operator = (
        Identity()
        if self.linear_operator is None
        else self.linear_operator
    )
    return self.regularization_parameter * gram_matrix(
        linear_operator,
        basis,
    )