def get_command(tool_xml):
 root = tool_xml.getroot()
 commands = root.findall('command')
 command = None
 if (len(commands) == 1):
  command = commands[0]
 return command

def get_command ( tool_xml ) : root = tool_xml . getroot ( ) commands = root . findall ( 'command' ) command = None if ( len ( commands ) == 1 ) : command = commands [ 0 ] return command
gets a zone by name .