Is there any easy way to detect linked polygon islands?

In Modo, the geometry API keeps a list of polygon islands- groups of geometry within the object that are linked. Imagine you have two cubes inside a single object- how would you easily access each of those ‘groups’ via python in blender? The only way I can think to do it is to just start with the first vertex and just recursively search for linked/cospatial vertices and build arrays manually (which sounds super slow).

Any pointers would be appreciated, as usual!

I’d check what “select linked” (L) does. Does it call a function that figures out the island or does it pull it from bmesh directly ? If the latter case, then it’s somewhere in there, hopefully it’s accessible via the API.