class_docstr: Step sampler that does not require each step to be evaluated
class_docstr_tok: ["Step","sampler","that","does","not","require","each","step","to","be","evaluated"]
code: def expand_to(self, j):
      # check if we already tried
  
      if j > 0 and self.contourpath.samplingpath.fwd_possible:
          # print("going forward...", j)
          starti, startx, startv, _ = max(self.points)
          if j > starti:
              xj, v = self.contourpath.extrapolate(j)
              self.goals.insert(
                  0,
                  (
                      "bisect",
                      starti,
                      startx,
                      startv,
                      None,
                      None,
                      None,
                      j,
                      xj,
                      v,
                      +1,
                  ),
              )
              # self.goals.append(goal)
              return xj, False
          else:
              # we are already done
              if self.log:
                  print("done going to", j, starti)
              pass
      elif j < 0 and self.contourpath.samplingpath.rwd_possible:
          # print("going backward...", j)
          starti, startx, startv, _ = min(self.points)
          if j < starti:
              xj, v = self.contourpath.extrapolate(j)
              self.goals.insert(
                  0,
                  (
                      "bisect",
                      starti,
                      startx,
                      startv,
                      None,
                      None,
                      None,
                      j,
                      xj,
                      v,
                      -1,
                  ),
              )
              # self.goals.append(goal)
              return xj, False
          else:
              # we are already done
              if self.log:
                  print("done going to", j)
              pass
      else:
          # we are trying to go somewhere we cannot.
          # skip to other goals
          if self.log:
              print("cannot go there", j)
          pass
  
imports: import numpy
  from numpy.linalg import norm
  import matplotlib.pyplot
  from .samplingpath import angle, extrapolate_ahead
label_desc: Use image node_id 2 for calling the ClockedBisectSampler obj's underlying member method code with example usage: obj.expand_to(j) and returns: xj,  False, xj,  False