def serialize(self):
data = {}<EOL>for k, v in self.iteritems():<EOL><INDENT>if k.startswith('<STR_LIT:_>'):<EOL><INDENT>continue<EOL><DEDENT>if isinstance(v, APIModel):<EOL><INDENT>data[k] = v.serialize()<EOL><DEDENT>elif v and is_seq_not_string(v) and isinstance(v[<NUM_LIT:0>], APIModel):<EOL><INDENT>data[k] = [x.serialize() for x in v]<EOL><DEDENT>else:<EOL><INDENT>data[k] = v<EOL><DEDENT><DEDENT>return data<EOL>
Converts :class:`adnpy.models.Model` into a normal dict without references to the api