code: def ensure_all_alt_ids_have_a_nest(nest_spec, list_elements, all_ids):
      
      unaccounted_alt_ids = []
      for alt_id in all_ids:
          if alt_id not in list_elements:
              unaccounted_alt_ids.append(alt_id)
      if unaccounted_alt_ids != []:
          msg = "Associate the following alternative ids with a nest: {}"
          raise ValueError(msg.format(unaccounted_alt_ids))
  
      return None
docs: Ensures that the alternative id's in `nest_spec` are all associated with
      a nest. Raises a helpful ValueError if they are not.
  
      Parameters
      ----------
      nest_spec : OrderedDict, or None, optional.
          Keys are strings that define the name of the nests. Values are lists of
          alternative ids, denoting which alternatives belong to which nests.
          Each alternative id must only be associated with a single nest!
          Default == None.
      list_elements : list of ints.
          Each element should correspond to one of the alternatives identified as
          belonging to a nest.
      all_ids : list of ints.
          Each element should correspond to one of the alternatives that is
          present in the universal choice set for this model.
  
      Returns
      -------
      None.