def template_macro_params(root):
 param_dict = {}
 macro_dict = _macros_of_type(root, 'template', (lambda el: el.text))
 for (key, value) in macro_dict.items():
  param_dict[key] = value
 return param_dict

def template_macro_params ( root ) : param_dict = { } macro_dict = _macros_of_type ( root , 'template' , ( lambda el : el . text ) ) for ( key , value ) in macro_dict . items ( ) : param_dict [ key ] = value return param_dict
look for template macros and populate param_dict with these .