def _nb_models_and_deficit(nb_targets, potential_targets):
    """ Calculates the number of models to learn based on the number of targets and the potential targets

    Args:
        nb_targets: number of targets
        potential_targets: attributes that can be used as targets

    Returns:
        nb_models: number of models
        nb_leftover_targets: number of potential targets which will not be used
    """
    nb_potential_targets = len(potential_targets)
    nb_models = nb_potential_targets // nb_targets
    nb_leftover_targets = nb_potential_targets % nb_targets

    return nb_models, nb_leftover_targets