def get_instructions(xmltree):
 instructions = xmltree.find('instructions')
 if (instructions is not None):
  instructions.tag = 'div'
  xmltree.remove(instructions)
  return etree.tostring(instructions, encoding='unicode')
 return None

def get_instructions ( xmltree ) : instructions = xmltree . find ( 'instructions' ) if ( instructions is not None ) : instructions . tag = 'div' xmltree . remove ( instructions ) return etree . tostring ( instructions , encoding = 'unicode' ) return None
removes <instructions> from the xmltree and returns them as a string .