code: def is_writable(file, *, user=None, check=False):
      filename, st, mode = _get_file_info(file)
      if check:
          try:
              okay = _check_file(filename, S_IWANY)
          except NotImplementedError:
              okay = NotImplemented
          if okay is not NotImplemented:
              return okay
          # Fall back to checking the mode.
      return _check_mode(st, mode, S_IWANY, user)
  
imports: import fnmatch
  import glob
  import os
  import os.path
  import shutil
  import stat
  from .iterutil import iter_many
label_desc: Use image node_id 19 for calling a global function with example usage: is_writable(file) and returns: _check_mode, okay