code: def run_interactive(query, editor=None, just_count=False, default_no=False):
      
      global yes_to_all
  
      # Load start from bookmark, if appropriate.
      bookmark = _load_bookmark()
      if bookmark:
          print('Resume where you left off, at %s (y/n)? '
                % str(bookmark), end=' ')
          sys.stdout.flush()
          if (_prompt(default='y') == 'y'):
              query.start_position = bookmark
  
      # Okay, enough of this foolishness of computing start and end.
      # Let's ask the user about some one line diffs!
      print('Searching for first instance...')
      suggestions = query.generate_patches()
  
      if just_count:
          for count, _ in enumerate(suggestions):
              terminal.terminal_move_to_beginning_of_line()
              print(count, end=" ")
              sys.stdout.flush()  # since print statement ends in comma
          print()
          return
  
      for patch in suggestions:
          _save_bookmark(patch.start_position)
          _ask_about_patch(patch, editor, default_no)
          print('Searching...')
      _delete_bookmark()
      if yes_to_all:
          terminal.terminal_clear()
          print(
              "You MUST indicate in your code review:"
              " \"codemod with 'Yes to all'\"."
              "Make sure you and other people review the changes.\n\n"
              "With great power, comes great responsibility."
          )
docs: Asks the user about each patch suggested by the result of the query.
  
      @param query        An instance of the Query class.
      @param editor       Name of editor to use for manual intervention, e.g.
                          'vim'
                          or 'emacs'.  If omitted/None, defaults to $EDITOR
                          environment variable.
      @param just_count   If true: don't run normally.  Just print out number of
                          places in the codebase where the query matches.