def METHOD_NAME(path, follow_symlinks=True, msg=None):
    """Assert that path exists but is not a directory.
    With follow_symlinks=True, the default, this will fail if path is a symlink
    to a directory. With follow_symlinks=False, it will pass in that case.
    """
    path = _strpath(path)
    st = _stat_for_assert(path, follow_symlinks, msg)
    if stat.S_ISDIR(st.st_mode):
        if msg is None:
            msg = "Path is a directory: %r" % path
        raise AssertionError(msg)