code: def check_type_and_values_of_alt_name_dict(alt_name_dict, alt_id_col, df):
      
      if not isinstance(alt_name_dict, dict):
          msg = "alt_name_dict should be a dictionary. Passed value was a {}"
          raise TypeError(msg.format(type(alt_name_dict)))
  
      if not all([x in df[alt_id_col].values for x in alt_name_dict.keys()]):
          msg = "One or more of alt_name_dict's keys are not "
          msg_2 = "in long_data[alt_id_col]"
          raise ValueError(msg + msg_2)
  
      return None
docs: Ensures that `alt_name_dict` is a dictionary and that its keys are in the
      alternative id column of `df`. Raises helpful errors if either condition
      is not met.
  
      Parameters
      ----------
      alt_name_dict : dict.
          A dictionary whose keys are the possible values in
          `df[alt_id_col].unique()`. The values should be the name that one
          wants to associate with each alternative id.
      alt_id_col : str.
          Denotes the column in `df` that contains the alternative ID values for
          each row.
      df : pandas dataframe.
          The dataframe of long format data that contains the alternative IDs.
  
      Returns
      -------
      None.