docstr: Find the first index in self.completions where completions[i] is
  greater or equal to s, or the last index if there is no such.
docstr_tok: ["Find","the","first","index","in","self.completions","where","completions","[","i","]","is","greater","or","equal","to","s",",","or","the","last","index","if","there","is","no","such","."]
code: def _binary_search(self, s):
      """Find the first index in self.completions where completions[i] is
      greater or equal to s, or the last index if there is no such.
      """
      i = 0
      j = len(self.completions)
      while j > i:
          m = (i + j) // 2
          if self.completions[m] >= s:
              j = m
          else:
              i = m + 1
      return min(i, len(self.completions) - 1)
  
imports: import platform
  from tkinter import *
  from tkinter.ttk import Scrollbar
  from idlelib.autocomplete import FILES, ATTRS
  from idlelib.multicall import MC_SHIFT
label_desc: Use image node_id 3 for calling the AutoCompleteWindow obj's underlying member method code with example usage: obj._binary_search(s) and returns: min