code: def get_file_mode(fname):
      """Retrieves the file mode corresponding to fname in a filesystem-tolerant manner.
  
      Parameters
      ----------
  
      fname : unicode
          The path to the file to get mode from
  
      """
      # Some filesystems (e.g., CIFS) auto-enable the execute bit on files.  As a result, we
      # should tolerate the execute bit on the file's owner when validating permissions - thus
      # the missing least significant bit on the third octal digit. In addition, we also tolerate
      # the sticky bit being set, so the lsb from the fourth octal digit is also removed.
      return stat.S_IMODE(os.stat(fname).st_mode) & 0o6677
  
imports: import os
  import sys
  import stat
  import errno
  import tempfile
  import warnings
  from ipython_genutils import py3compat
  from contextlib import contextmanager
  from distutils.util import strtobool
  from ipython_genutils import py3compat
label_desc: Use image node_id 13 for calling a global function with example usage: get_file_mode(fname) and returns: unknown