def _set_controls(coordinator, root, namespace):
 namespaces = {'n': namespace}
 controls_list = root.xpath('n:controls', namespaces=namespaces)
 if controls_list:
  controls = controls_list[0]
  concurrency = controls.xpath('n:concurrency', namespaces=namespaces)
  timeout = controls.xpath('n:timeout', namespaces=namespaces)
  execution = controls.xpath('n:execution', namespaces=namespaces)
  throttle = controls.xpath('n:throttle', namespaces=namespaces)
  if concurrency:
   coordinator.concurrency = concurrency[0].text
  if timeout:
   coordinator.timeout = timeout[0].text
  if execution:
   coordinator.execution = execution[0].text
  if throttle:
   coordinator.throttle = throttle[0].text

def _set_controls ( coordinator , root , namespace ) : namespaces = { 'n' : namespace } controls_list = root . xpath ( 'n:controls' , namespaces = namespaces ) if controls_list : controls = controls_list [ 0 ] concurrency = controls . xpath ( 'n:concurrency' , namespaces = namespaces ) timeout = controls . xpath ( 'n:timeout' , namespaces = namespaces ) execution = controls . xpath ( 'n:execution' , namespaces = namespaces ) throttle = controls . xpath ( 'n:throttle' , namespaces = namespaces ) if concurrency : coordinator . concurrency = concurrency [ 0 ] . text if timeout : coordinator . timeout = timeout [ 0 ] . text if execution : coordinator . execution = execution [ 0 ] . text if throttle : coordinator . throttle = throttle [ 0 ] . text
get controls from coordinator xml set properties on coordinator with controls from xml etree root .