Accurate measurement of available Calories in foods

According to this Wiki page, the Calorie value of foods is calculated by burning a sample of the food and measuring the heat it produces (makes sense), then multiplying this by a coefficient that adjusts for how much of that energy is actually available to the human body through digestion.

OK, that all makes sense, but how are the coefficients calculated?

I’ve always been curious about this too, with regard to how much error there is. It seems like the coefficients would be different for different types of foods (that the body processes more or less efficiently), and that the overall coefficient for a given food comprised of various ingredients could be difficult to calculate. Is the efficiency of a particular food necessarily equal to the weighted average of the efficiencies of its ingredients, or can interactions between ingredients change how well your body can process them?

It could be that there is such a variance, but that in practice it’s so small that it can be (and is) ignored. Is that the case?