code: def isdir(s):
      """Return true if the pathname refers to an existing directory."""
      try:
          st = os.stat(s)
      except (OSError, ValueError):
          return False
      return stat.S_ISDIR(st.st_mode)
  
file_path: cpython/Lib/genericpath.py
imports: import os
  import stat
label_desc: Use image node_id 3 for calling a global function with example usage: isdir(s) and returns: stat, False