code: def _to_mode(attr):
      m = 0
      if attr & FILE_ATTRIBUTE_DIRECTORY:
          m |= stdstat.S_IFDIR | 0o111
      else:
          m |= stdstat.S_IFREG
      if attr & FILE_ATTRIBUTE_READONLY:
          m |= 0o444
      else:
          m |= 0o666
      return m
  
file_path: wandb/wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/win32stat.py
imports: import ctypes
  import ctypes.wintypes
  import stat
  from collections import namedtuple
label_desc: Use image node_id 1 for calling a global function with example usage: _to_mode(attr) and returns: m