class_docstr: A subclass of AutoSuggestFromHistory that allow navigation to next/previous
  suggestion from history. To do so it remembers the current position, but it
  state need to carefully be cleared on the right events.
class_docstr_tok: ["A","subclass","of","AutoSuggestFromHistory","that","allow","navigation","to","next\/previous","suggestion","from","history",".","To","do","so","it","remembers","the","current","position",",","but","it","state","need","to","carefully","be","cleared","on","the","right","events","."]
docstr: text : str
      Text content to find a match for, the user cursor is most of the
      time at the end of this text.
  skip_lines : float
      number of items to skip in the search, this is used to indicate how
      far in the list the user has navigated by pressing up or down.
      The float type is used as the base value is +inf
  history : History
      prompt_toolkit History instance to fetch previous entries from.
  previous : bool
      Direction of the search, whether we are looking previous match
      (True), or next match (False).
  
  Yields
  ------
  Tuple with:
  str:
      current suggestion.
  float:
      will actually yield only ints, which is passed back via skip_lines,
      which may be a +inf (float)
docstr_tok: ["text",":","str","Text","content","to","find","a","match","for",",","the","user","cursor","is","most","of","the","time","at","the","end","of","this","text",".","skip_lines",":","float","number","of","items","to","skip","in","the","search",",","this","is","used","to","indicate","how","far","in","the","list","the","user","has","navigated","by","pressing","up","or","down",".","The","float","type","is","used","as","the","base","value","is","+inf","history",":","History","prompt_toolkit","History","instance","to","fetch","previous","entries","from",".","previous",":","bool","Direction","of","the","search",",","whether","we","are","looking","previous","match","(","True",")",",","or","next","match","(","False",")",".","Yields","--","--","--","Tuple","with",":","str",":","current","suggestion",".","float",":","will","actually","yield","only","ints",",","which","is","passed","back","via","skip_lines",",","which","may","be","a","+inf","(","float",")"]
code: def _find_match(
      self,
      text: str,
      skip_lines: float,
      history: History,
      previous: bool,
  ) -> Generator[Tuple[str, float], None, None]:
      """
      text : str
          Text content to find a match for, the user cursor is most of the
          time at the end of this text.
      skip_lines : float
          number of items to skip in the search, this is used to indicate how
          far in the list the user has navigated by pressing up or down.
          The float type is used as the base value is +inf
      history : History
          prompt_toolkit History instance to fetch previous entries from.
      previous : bool
          Direction of the search, whether we are looking previous match
          (True), or next match (False).
  
      Yields
      ------
      Tuple with:
      str:
          current suggestion.
      float:
          will actually yield only ints, which is passed back via skip_lines,
          which may be a +inf (float)
  
  
      """
      line_number = -1
      for string in reversed(list(history.get_strings())):
          for line in reversed(string.splitlines()):
              line_number += 1
              if not previous and line_number < skip_lines:
                  continue
              # do not return empty suggestions as these
              # close the auto-suggestion overlay (and are useless)
              if line.startswith(text) and len(line) > len(text):
                  yield line[len(text) :], line_number
              if previous and line_number >= skip_lines:
                  return
  
imports: import re
  import tokenize
  from io import StringIO
  from typing import Callable, List, Optional, Union, Generator, Tuple
  import warnings
  from prompt_toolkit.buffer import Buffer
  from prompt_toolkit.key_binding import KeyPressEvent
  from prompt_toolkit.key_binding.bindings import named_commands
  from prompt_toolkit.auto_suggest import AutoSuggestFromHistory, Suggestion
  from prompt_toolkit.document import Document
  from prompt_toolkit.history import History
  from prompt_toolkit.shortcuts import PromptSession
  from prompt_toolkit.layout.processors import Processor, Transformation, TransformationInput
  from IPython.core.getipython import get_ipython
  from IPython.utils.tokenutil import generate_tokens
  from .filters import pass_through
label_desc: Use image node_id 7 for calling the NavigableAutoSuggestFromHistory obj's underlying member method code with example usage: obj._find_match(text, skip_lines, history, previous) without return types