code: def _stat_for_assert(path, follow_symlinks=True, msg=None):
      stat = os.stat if follow_symlinks else os.lstat
      try:
          return stat(path)
      except OSError:
          if msg is None:
              msg = (
                  "Path does not exist, or can't be stat-ed: %r" % path
              )
          raise AssertionError(msg)
  
file_path: catboost/contrib/python/testpath/py3/testpath/asserts.py
imports: import os
  import stat
label_desc: Use image node_id 1 for calling a global function with example usage: _stat_for_assert(path, follow_symlinks, msg) and returns: stat