Microbes play a dual role when used for sewage treatment as they not only help to retrieve usable water but also generate fuel. Write how this happens?

Heterotrophic microbes naturally present in sewage are used, and vogorous growth of aerobic microbes as flocs uses up organic matter in effluent and reduce BOD of waste water; other kinds of bacteria grow in it anaerobically and digest the bacteria and fungi called flocs. As they digest flocs, a mixture of carbon dioxide or biogas is evolved, which can be used as a fuel.