def METHOD_NAME(
    X: FDataBasis,
    y: NDArrayFloat,
    *,
    basis: Basis,
    **_: Any,
) -> CoefficientInfoFDataBasis:
    if basis is None:
        basis = X.basis
    if not isinstance(basis, Basis):
        raise TypeError(f"basis must be a Basis object, not {type(basis)}")
    return CoefficientInfoFDataBasis(basis=basis.to_basis())