Not fungi! Nope, they're heterotrophs, like animals! That means that they do not photosynthesize, and must instead derive their metabolic energy from other sources, either as symbionts or parasites.
They consume oxygen, and then emit the plant-food carbon dioxide.
Regards,
Apparently Diskagna housed a photosymbiont responsible for some of the early oxygenation
Don’t plants require oxygen to metabolize in the absence of light? The net result is more oxygen than carbon dioxide, but they still must metabolize at night.