class_docstr: Step sampler on a sampling path.
docstr: Adjust scale, but not above maxlength.
docstr_tok: ["Adjust","scale",",","but","not","above","maxlength","."]
code: def adjust_scale(self, maxlength):
      """Adjust scale, but not above maxlength."""
      # print("%2d | %2d | %2d | %2d %2d %2d %2d | %f"  % (self.iresets, self.istep,
      #     len(self.history), self.naccepts, self.nrejects,
      #     self.noutside_regions, self.nstuck, self.scale))
      assert len(self.history) > 1
  
      if self.naccepts < (self.nrejects + self.naccepts) * self.balance:
          if self.log:
              print(
                  "adjusting scale %f down: istep=%d inside=%d outside=%d region=%d nstuck=%d"
                  % (
                      self.scale,
                      len(self.history),
                      self.naccepts,
                      self.nrejects,
                      self.noutside_regions,
                      self.nstuck,
                  )
              )
          self.scale /= self.nudge
      else:
          if self.scale < maxlength or True:
              if self.log:
                  print(
                      "adjusting scale %f up: istep=%d inside=%d outside=%d region=%d nstuck=%d"
                      % (
                          self.scale,
                          len(self.history),
                          self.naccepts,
                          self.nrejects,
                          self.noutside_regions,
                          self.nstuck,
                      )
                  )
              self.scale *= self.nudge
      assert self.scale > 1e-10, self.scale
  
imports: import numpy
  import matplotlib.pyplot
  from ultranest.samplingpath import SamplingPath, ContourSamplingPath, extrapolate_ahead
  from ultranest.stepsampler import StepSampler
  from ultranest.stepsampler import generate_region_oriented_direction, generate_region_random_direction, generate_random_direction
  from ultranest.flatnuts import ClockedStepSampler, ClockedBisectSampler, ClockedNUTSSampler
  from ultranest.flatnuts import SingleJumper, DirectJumper, IntervalJumper
label_desc: Use image node_id 10 for calling the SamplingPathStepSampler obj's underlying member method code with example usage: obj.adjust_scale(maxlength) without return types