Thanks to this answer, I'm using
bpy.ops.view3d.camera_to_view_selected() to automatically place a camera so that it frames the selected object for rendering. But presumably there are lots of (x,y,z) locations within the scene where the camera could be placed and still frame the object.
Does anyone know how Blender decides which of these locations to move the camera to? For example, does it take the starting position of the camera into consideration?