def prepare(self):
<EOL>attributes, elements = OrderedDict(), []<EOL>nsmap = dict([self.meta.namespace])<EOL>for name, item in self._items.items():<EOL><INDENT>if isinstance(item, Attribute):<EOL><INDENT>attributes[name] = item.prepare(self)<EOL><DEDENT>elif isinstance(item, Element):<EOL><INDENT>nsmap.update([item.namespace])<EOL>elements.append(item)<EOL><DEDENT><DEDENT>return attributes, elements, nsmap<EOL>
Prepare the date in the instance state for serialization.