class_docstr: Set the Rounding and Saturation mode of the output (and accumulator, if applicable)
  of the layers specific in layer list.
  The layer list is empty by default.
  To specify which layer to apply this pass to, perform e.g.:
  hls4ml.model.optimizer.get_optimizer('output_rounding_saturation_mode').configure(layers=['Dense', 'Activation'])
  The Rounding and Saturation modes are 'None' by default (so use the compiler defaults)
  To set which mode to use:
  hls4ml.model.optimizer.get_optimizer('output_rounding_saturation_mode').configure(rounding_mode='AP_RND_CONV')
  hls4ml.model.optimizer.get_optimizer('output_rounding_saturation_mode').configure(saturation_mode='AP_SAT')
class_docstr_tok: ["Set","the","Rounding","and","Saturation","mode","of","the","output","(","and","accumulator",",","if","applicable",")","of","the","layers","specific","in","layer","list",".","The","layer","list","is","empty","by","default",".","To","specify","which","layer","to","apply","this","pass","to",",","perform","e.g",".",":","hls4ml.model.optimizer.get_optimizer","(","'output_rounding_saturation_mode","'",")",".configure","(","layers=","[","'Dense","'",",","'Activation","'","]",")","The","Rounding","and","Saturation","modes","are","'None","'","by","default","(","so","use","the","compiler","defaults",")","To","set","which","mode","to","use",":","hls4ml.model.optimizer.get_optimizer","(","'output_rounding_saturation_mode","'",")",".configure","(","rounding_mode='AP_RND_CONV","'",")","hls4ml.model.optimizer.get_optimizer","(","'output_rounding_saturation_mode","'",")",".configure","(","saturation_mode='AP_SAT","'",")"]
code: def precision_string_modify(self, pstr):
      # For when the type is a string not an Type
      mode = ""
      if self.rounding_mode is not None:
          mode += "," + self.rounding_mode
      if self.saturation_mode is not None:
          mode += "," + self.saturation_mode
      if self.saturation_bits is not None:
          mode += "," + str(self.saturation_bits)
      mode += ">"
      pstr = pstr.replace(">", mode)
      return pstr
  
imports: import numpy
  import tensorflow
  from hls4ml.model.layers import BatchNormalization, register_layer
  from hls4ml.model.optimizer import ConfigurableOptimizerPass, OptimizerPass, register_pass
  from hls4ml.model.types import FixedPrecisionType, IntegerPrecisionType, NamedType, QKerasPO2Quantizer
label_desc: Use image node_id 4 for calling the OutputRoundingSaturationMode obj's underlying member method code with example usage: obj.precision_string_modify(pstr) and returns: pstr