def serialize(self, elt, sw, pyobj, **kw):
if isinstance(pyobj, TypeCode):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>what = getattr(pyobj, '<STR_LIT>', None)<EOL>if what is not None and type(pyobj) is types.InstanceType:<EOL><INDENT>tc = pyobj.__class__<EOL>what = Any.serialmap.get(tc)<EOL>if not what:<EOL><INDENT>tc = (type, pyobj.__class__.__name__)<EOL>what = Any.serialmap.get(tc)<EOL><DEDENT><DEDENT>self.logger.debug('<STR_LIT>', self.processContents)<EOL>if what is None:<EOL><INDENT>what = Any(pname=(self.nspname,self.pname))<EOL><DEDENT>self.logger.debug('<STR_LIT>', what.__class__.__name__)<EOL>what.serialize(elt, sw, pyobj, **kw)<EOL>
Must provice typecode to AnyElement for serialization, else
        try to use TC.Any to serialize instance which will serialize 
        based on the data type of pyobj w/o reference to XML schema 
        instance.