Change the file format from a Node with Python

Hello,
i have a litle Problem. For example i have 3 Outputnodes.
if version > 66:
fo_r1 = tree.nodes.new( type = node_types[67][‘FO’] )
else:
fo_r1 = tree.nodes.new( type = node_types[66][‘FO’] )

and so on. My Problem is how can i change the file format to open exr for 2 Nodes?
can everyone help me ?