code: def _is_root():
      
      import os
      import ctypes
      try:
          return os.geteuid() == 0
      except AttributeError:
          return ctypes.windll.shell32.IsUserAnAdmin() != 0
      return False
docs: Checks if the user is rooted.