def _add_type_covariates(options, optim_paras):
    """Add type covariates.

    Since types only introduce constant shifts in the utility functions, this function
    conveniently adds covariates for each type by default.

    Examples
    --------
    >>> options = {"covariates": {}}
    >>> optim_paras = {"n_types": 2}
    >>> _add_type_covariates(options, optim_paras)
    {'covariates': {'type_1': 'type == 1'}}

    """
    if optim_paras["n_types"] >= 2:
        type_covariates = {
            f"type_{i}": f"type == {i}" for i in range(1, optim_paras["n_types"])
        }

        options["covariates"] = {**options["covariates"], **type_covariates}

    return options