async def _dump_container(self, writer, container, container_type, params=None):
        """
        Dumps container of elements to the writer.

        :param writer:
        :param container:
        :param container_type:
        :param params:
        :return:
        """
        await self._dump_container_size(writer, len(container), container_type)

        elem_type = container_elem_type(container_type, params)

        for idx, elem in enumerate(container):
            try:
                self.tracker.push_index(idx)
                await self.dump_field(
                    writer, elem, elem_type, params[1:] if params else None
                )
                self.tracker.pop()
            except Exception as e:
                raise helpers.ArchiveException(e, tracker=self.tracker) from e