code: def _grep_dialog(parent):  # htest #
      from tkinter import Toplevel, Text, SEL, END
      from tkinter.ttk import Frame, Button
      from idlelib.pyshell import PyShellFileList
  
      top = Toplevel(parent)
      top.title("Test GrepDialog")
      x, y = map(int, parent.geometry().split("+")[1:])
      top.geometry(f"+{x}+{y + 175}")
  
      flist = PyShellFileList(top)
      frame = Frame(top)
      frame.pack()
      text = Text(frame, height=5)
      text.pack()
      text.insert("1.0", "import grep")
  
      def show_grep_dialog():
          text.tag_add(SEL, "1.0", "1.end")
          grep(text, flist=flist)
          text.tag_remove(SEL, "1.0", "1.end")
  
      button = Button(
          frame, text="Show GrepDialog", command=show_grep_dialog
      )
      button.pack()
  
file_path: cpython/Lib/idlelib/grep.py
imports: import fnmatch
  import os
  import sys
  from tkinter import StringVar, BooleanVar
  from tkinter.ttk import Checkbutton
  from idlelib.searchbase import SearchDialogBase
  from idlelib import searchengine
label_desc: Use image node_id 4 for calling a global function with example usage: _grep_dialog(parent) without return types