code: def contains_doctest(text):
      try:
          # check if it's valid Python as-is
          compile(text, "<string>", "exec")
          return False
      except SyntaxError:
          pass
      r = re.compile(r"^\s*>>>", re.M)
      m = r.search(text)
      return bool(m)
  
imports: import sys
  import os
  import shutil
  import io
  import re
  import textwrap
  from os.path import relpath
  from errno import EEXIST
  import traceback
label_desc: Use image node_id 8 for calling a global function with example usage: contains_doctest(text) and returns: bool, False