from typing import Optional
from typing import Dict


def cb_str_loss_wrapper(name: str, **params: Optional[Dict]) -> str:
    """CatBoost loss name wrapper, if it has keyword args.  # noqa D403

    Args:
        name: One of CatBoost loss names.
        **params: Additional parameters.

    Returns:
        Wrapped CatBoost loss name.

    """
    return name + ":" + ";".join([k + "=" + str(v) for (k, v) in params.items()])