The classic answer is that a directory is a mount point if the st_dev field returned by stat is different from the value in its parent, or if it's the root directory. This is the criterion that most tools use (find -xdev, rsync -x, du -x, …). This is provided as the os.path.ismount function in Python.
This method has both false negatives and false positives due to a number of complex ways of arranging filesystems. For example, on Linux, you can bind mount a (part of a) filesystem on a subdirectory of itself, creating a mount point where the parent directory is on the same filesystem. Conversely, some filesystems with subvolumes (at least btrfs) present a different st_dev value on each subvolume, but a subvolume root isn't a mount point. Network filesystems can cause both false positives and false negatives because a client can mount the same server directory on different paths, and possibly via different exports.
This won't help you directly, because if a directory is empty, that doesn't mean that it was a mount point at some other time. If you want to detect mount points, you need to do it at indexing time. You may want to keep separate mount points in separate indexes, and only update indexes whose roots are present and non-empty. Beware that a directory that is sometimes a mount point may be non-empty even when the usual filesystem isn't mounted, either because some other filesystem is mounted there or simply because there are files in that directory (the files in a directory are hidden while this directory is a mount point).