def _update_dtypes(candidate_model):
    """Update dtypes of specific columns from float to int.

    Updates dtypes of *candidate_model* so that columns representing integer
    are set to integers.

    Args:
        candidate_model (pd.DataFrame): Data frame representing a causal
        forest model, which might have columns that represent integer dtypes
        but are stored as floats.

    Returns:
        fitted_model (pd.DataFrame): Updated model.

    """
    columns_to_int = [
        "left_child",
        "right_child",
        "level",
        "split_feat",
    ]

    fitted_model = candidate_model.copy()
    fitted_model[columns_to_int] = fitted_model[columns_to_int].astype("Int64")

    return fitted_model