Updating the python code in the C2 IP Range idiom so it generates valid XML.