"grams of CO2 per km" is a very strange way to rate an engine.
It makes sense for a complete car. But just an engine by itself? Without specifying the speed of the car, weight of the car, aerodynamic shape, type of fuel?
They have a model to estimate various features of the car or they take it live from real cars, and deduce the resulting opposing force at speeds to counter-apply on the engine when bolted on a test bench.