code: def in_idle():
      """
      Return True if this function is run within idle.  Tkinter
      programs that are run in idle should never call ``Tk.mainloop``; so
      this function should be used to gate all calls to ``Tk.mainloop``.
  
      :warning: This function works by checking ``sys.stdin``.  If the
          user has modified ``sys.stdin``, then it may return incorrect
          results.
      :rtype: bool
      """
      import sys
  
      return sys.stdin.__class__.__name__ in ("PyShell", "RPCProxy")
  
imports: import inspect
  import locale
  import os
  import pydoc
  import re
  import textwrap
  import unicodedata
  import warnings
  from collections import defaultdict, deque
  from itertools import chain, combinations, islice, tee
  from pprint import pprint
  from urllib.request import HTTPPasswordMgrWithDefaultRealm, ProxyBasicAuthHandler, ProxyDigestAuthHandler, ProxyHandler, build_opener, getproxies, install_opener
  from nltk.collections import *
  from nltk.internals import deprecated, raise_unorderable_types, slice_bounds
label_desc: Use image node_id 2 for calling a global function with example usage: in_idle() and returns: unknown