code: def limit_step(self, step):
          
          if self.qmax is None:
              return step
          else:
              return np.clip(step, -self.qmax, self.qmax)
docs: Clip the a step within the maximum allowed range