def add_headers(self, **headers):
class _holder: pass<EOL>def _remap(pyobj, **d):<EOL><INDENT>pyobj.__dict__ = d<EOL>for k,v in list(pyobj.__dict__.items()):<EOL><INDENT>if type(v) is not dict: continue<EOL>pyobj.__dict__[k] = p = _holder()<EOL>_remap(p, **v)<EOL><DEDENT><DEDENT>for k,v in list(headers.items()):<EOL><INDENT>h = [i for i in self.callinfo.inheaders if k in i.type][<NUM_LIT:0>]<EOL>if h.element_type != <NUM_LIT:1>: <EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>typecode = GED(*h.type)<EOL>if typecode is None: <EOL><INDENT>raise RuntimeError('<STR_LIT>' %str(h.type))<EOL><DEDENT>pyclass = typecode.pyclass<EOL>if pyclass is None: <EOL><INDENT>raise RuntimeError('<STR_LIT>' %str(h.type))<EOL><DEDENT>if type(v) is not dict:<EOL><INDENT>pyobj = pyclass(v)<EOL><DEDENT>else:<EOL><INDENT>pyobj = pyclass()<EOL>_remap(pyobj, **v)<EOL><DEDENT>self.soapheaders.append(pyobj)<EOL><DEDENT>
packing dicts into typecode pyclass, may fail if typecodes are
        used in the body (when asdict=True)