async def prepare_container(self, size, container, elem_type=None):
if not self.writing:<EOL><INDENT>if container is None:<EOL><INDENT>return gen_elem_array(size, elem_type)<EOL><DEDENT>fvalue = get_elem(container)<EOL>if fvalue is None:<EOL><INDENT>fvalue = []<EOL><DEDENT>fvalue += gen_elem_array(max(<NUM_LIT:0>, size - len(fvalue)), elem_type)<EOL>set_elem(container, fvalue)<EOL>return fvalue<EOL><DEDENT>
Prepares container for serialization
:param size:
:param container:
:return: