def _get_likelihood(
    likelihood: Optional[str],
    n_outputs: int,
    quantiles: Optional[list[float]],
) -> Optional[SKLearnLikelihood]:
    """Get the `Likelihood` object for `SKLearnModel`.

    Parameters
    ----------
    likelihood
        The likelihood name. Must be one of ('gaussian', 'poisson', 'quantile').
    n_outputs
        The number of predicted outputs per model call. `1` if `multi_models=False`, otherwise
        `output_chunk_length`.
    quantiles
        Optionally, a list of quantiles. Only effective for `likelihood='quantile'`.
    """
    if likelihood is None:
        return None
    elif likelihood == "gaussian":
        return GaussianLikelihood(n_outputs=n_outputs)
    elif likelihood == "poisson":
        return PoissonLikelihood(n_outputs=n_outputs)
    elif likelihood == "quantile":
        return QuantileRegression(n_outputs=n_outputs, quantiles=quantiles)
    else:
        raise_log(
            ValueError(
                f"Invalid `likelihood='{likelihood}'`. Must be one of ('gaussian', 'poisson', 'quantile')"
            ),
            logger=logger,
        )
Get the `Likelihood` object for `SKLearnModel`.

    Parameters
    ----------
    likelihood
        The likelihood name. Must be one of ('gaussian', 'poisson', 'quantile').
    n_outputs
        The number of predicted outputs per model call. `1` if `multi_models=False`, otherwise
        `output_chunk_length`.
    quantiles
        Optionally, a list of quantiles. Only effective for `likelihood='quantile'`.
    
darts/utils/likelihood_models/sklearn.py