It's fairly easy to get the objects that are in a scene:
dict(myScene.collection.all_objects) # mapping from name to object.
But how to go the other way?
scene = magic_get_linked_scenes(myOb)
One could iterate through all scenes:
linked_scenes = []
for scene_name, scene in dict(bpy.data.scenes):
for ob_name, ob in dict(scene.collection.all_objects):
if ob.name == name:
linked_scenes.append(scene) # checking object equality should also work.
But this is clumsy and slow if there are a very large number of objects. Is there a better way?
list(bpy.context.scene.objects)
$\endgroup$