How is the the total bake time determined?

I always wondered how Blender determines how long a texture bake will take. The progress is being shown on the bottom of the window with frequent progrss updates and an (estimated?) remaining bake time. I have tried to look for a place to intercept this information using python and I have tried catching this information using the different debug Command Line Argument. Since Cycles X does not render fixed tiles anymore, it is even harder to get any information regarding bake progress.

Is it possible to intercept or receive the information in any other way through python (addons)?
I am able to intercept any GPU logs but they do not have any useful information regarding the texture bake progress in 3.0.

The progress bar for baking is based on the percentage of pixel samples completed (number of pixels x number of samples). There is currently no API to access this information from Python.