How do I add elements in xml based on another element attribute using python

visit shbcf.ru