code: def stop_condition(self, condition):
          
  
          # Try to parse this into a stop condition with each of our registered
          # condition types
          for cond_format in self._known_conditions:
              try:
                  cond = cond_format.FromString(condition)
                  self.stop_conditions.append(cond)
                  return
              except ArgumentError:
                  continue
  
          raise ArgumentError("Stop condition could not be processed by any known StopCondition type", condition=condition, suggestion="It may be mistyped or otherwise invalid.")
docs: Add a stop condition to this simulation.
  
          Stop conditions are specified as strings and parsed into
          the appropriate internal structures.
  
          Args:
              condition (str): a string description of the stop condition