code: def assert_isdir(path, follow_symlinks=True, msg=None):
      """Assert that path exists and is a directory.
  
      With follow_symlinks=True, the default, this will pass if path is a symlink
      to a directory. With follow_symlinks=False, it will fail in that case.
      """
      path = _strpath(path)
      st = _stat_for_assert(path, follow_symlinks, msg)
      if not stat.S_ISDIR(st.st_mode):
          if msg is None:
              msg = "Path exists, but is not a directory: %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 6 for calling a global function with example usage: assert_isdir(path, follow_symlinks, msg) without return types