code: def register_simulants(self, simulants: pd.DataFrame):
          
          if not all(k in simulants.columns for k in self._key_columns):
              raise RandomnessError("The simulants dataframe does not have all specified key_columns.")
          self._key_mapping.update(simulants.set_index(self._key_columns).index)
docs: Adds new simulants to the randomness mapping.
  
          Parameters
          ----------
          simulants :
              A table with state data representing the new simulants.  Each simulant should
              pass through this function exactly once.
  
          Raises
          ------
          RandomnessError :
              If the provided table does not contain all key columns specified in the configuration.