There are many variants of hybrid drivetrains, some I think would be easier to implement, some - rather difficult.
Series hybrids would probably be the easiest to implement, since ICE is essentially just a battery charger in such cars (code would literally be just "if SoC <100%, increase battery charge and reduce fuel by 0.1% every X seconds until fuel drops to 0"), meanwhile more power-split hybrids, especially with CVT gearboxes, might be quite tricky.