code: def file_line_helper(line):
      """Extract file name and line number from line of text.
  
      Check if line of text contains one of the file/line patterns.
      If it does and if the file and line are valid, return
      a tuple of the file name and line number.  If it doesn't match
      or if the file or line is invalid, return None.
      """
      if not file_line_progs:
          compile_progs()
      for prog in file_line_progs:
          match = prog.search(line)
          if match:
              filename, lineno = match.group(1, 2)
              try:
                  f = open(filename)
                  f.close()
                  break
              except OSError:
                  continue
      else:
          return None
      try:
          return filename, int(lineno)
      except TypeError:
          return None
  
file_path: cpython/Lib/idlelib/outwin.py
imports: import re
  from tkinter import messagebox
  from idlelib.editor import EditorWindow
label_desc: Use image node_id 2 for calling a global function with example usage: file_line_helper(line) and returns: None, filename,  int, None