code: def ensure_all_alternatives_are_chosen(alt_id_col, choice_col, dataframe):
      
      all_ids = set(dataframe[alt_id_col].unique())
      chosen_ids = set(dataframe.loc[dataframe[choice_col] == 1,
                                     alt_id_col].unique())
      non_chosen_ids = all_ids.difference(chosen_ids)
      if len(non_chosen_ids) != 0:
          msg = ("The following alternative ID's were not chosen in any choice "
                 "situation: \n{}")
          raise ValueError(msg.format(non_chosen_ids))
  
      return None
docs: Ensures that all of the available alternatives in the dataset are chosen at
      least once (for model identification). Raises a ValueError otherwise.
  
      Parameters
      ----------
      alt_id_col : str.
          Should denote the column in `dataframe` that contains the alternative
          identifiers for each row.
      choice_col : str.
          Should denote the column in `dataframe` that contains the ones and
          zeros that denote whether or not the given row corresponds to the
          chosen alternative for the given individual.
      dataframe : pandas dataframe.
          Should contain the data being used to estimate the model, as well as
          the headers denoted by `alt_id_col` and `choice_col`.
  
      Returns
      -------
      None.