async def container_dump(self, container, container_type, params=None, obj=None):
elem_type = x.container_elem_type(container_type, params)<EOL>obj = [] if not x.has_elem(obj) else x.get_elem(obj)<EOL>if container is None:  <EOL><INDENT>return NoSetSentinel()  <EOL><DEDENT>for idx, elem in enumerate(container):<EOL><INDENT>try:<EOL><INDENT>self.tracker.push_index(idx)<EOL>fvalue = await self._dump_field(elem, elem_type, params[<NUM_LIT:1>:] if params else None)<EOL>self.tracker.pop()<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise helpers.ArchiveException(e, tracker=self.tracker) from e<EOL><DEDENT>if not isinstance(fvalue, NoSetSentinel):<EOL><INDENT>obj.append(fvalue)<EOL><DEDENT><DEDENT>return obj if not self.modelize else ArrayModel(obj, xmr_type_to_type(elem_type))<EOL>
Dumps container of elements to the writer.

:param container:
:param container_type:
:param params:
:param obj:
:return: