def _get_prototype(dic, prot, protparents):
 if ('prototype' in dic):
  for prototype in make_iter(dic['prototype']):
   new_prot = _get_prototype(protparents.get(prototype, {}), prot, protparents)
   prot.update(new_prot)
 prot.update(dic)
 prot.pop('prototype', None)
 return prot

def _get_prototype ( dic , prot , protparents ) : if ( 'prototype' in dic ) : for prototype in make_iter ( dic [ 'prototype' ] ) : new_prot = _get_prototype ( protparents . get ( prototype , { } ) , prot , protparents ) prot . update ( new_prot ) prot . update ( dic ) prot . pop ( 'prototype' , None ) return prot
recursively traverse a prototype dictionary .