class_docstr: Jump to n steps immediately. If unsuccessful, takes rest in other direction. 
class_docstr_tok: ["Jump","to","n","steps","immediately",".","If","unsuccessful",",","takes","rest","in","other","direction","."]
code: def check_gaps(self, gaps):
      pointi = {
          j: (xj, Lj) for j, xj, vj, Lj in self.stepsampler.points
      }
      ilo, ihi = min(pointi.keys()), max(pointi.keys())
      currenti = self.currenti
      direction = self.direction
      for isteps in range(self.nsteps):
          target = currenti + direction
          accept = ilo <= target <= ihi and not gaps.get(target, False)
          if accept:
              currenti = target
              if self.log:
                  print(
                      "accepted jump %d->%d" % (self.currenti, target),
                      "fwd" if self.direction == 1 else "rwd",
                  )
          else:
              # reverse
              if self.log:
                  print(
                      "rejected jump %d->%d" % (self.currenti, target),
                      "fwd" if self.direction == 1 else "rwd",
                  )
              direction *= -1
  
      if self.log:
          print("--> %d" % currenti)
      # double-check that final point is OK:
      # if we already evaluated it, it is OK
      if currenti in pointi:
          return None, None
  
      if currenti in gaps:
          assert (
              gaps[currenti] == False
          ), "could not have jumped into a known gap"
          return None, None
  
      xj, vj, Lj, onpath = self.stepsampler.contourpath.interpolate(
          currenti
      )
      if Lj is not None:
          return None, None
  
      if self.log:
          print("    checking for gap ...")
      # otherwise ask caller to verify it and call us again with
      # gaps[i] = True if outside, gaps[i] = False if OK
      return xj, currenti
  
imports: import numpy
  from numpy.linalg import norm
  import matplotlib.pyplot
  from .samplingpath import angle, extrapolate_ahead
label_desc: Use image node_id 3 for calling the DirectJumper obj's underlying member method code with example usage: obj.check_gaps(gaps) and returns: xj,  currenti, None,  None, None,  None, None,  None