code: def search(reader, key, prev_size=0, compare_func=cmp, block_size=8192):
      
      iter_ = binsearch(reader, key, compare_func, block_size)
      iter_ = linearsearch(iter_,
                           key, prev_size=prev_size,
                           compare_func=compare_func)
      return iter_
docs: Perform a binary search for a specified key to within a 'block_size'
      (default 8192) sized block followed by linear search
      within the block to find first matching line.
  
      When performin_g linear search, keep track of up to N previous lines before
      first matching line.