async def _dump_tuple(self, writer, elem, elem_type, params=None):
if len(elem) != len(elem_type.f_specs()):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>" % len(elem_type.f_specs())<EOL>)<EOL><DEDENT>await dump_uvarint(writer, len(elem))<EOL>elem_fields = params[<NUM_LIT:0>] if params else None<EOL>if elem_fields is None:<EOL><INDENT>elem_fields = elem_type.f_specs()<EOL><DEDENT>for idx, elem in enumerate(elem):<EOL><INDENT>try:<EOL><INDENT>self.tracker.push_index(idx)<EOL>await self.dump_field(<EOL>writer, elem, elem_fields[idx], params[<NUM_LIT:1>:] if params else None<EOL>)<EOL>self.tracker.pop()<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise helpers.ArchiveException(e, tracker=self.tracker) from e<EOL><DEDENT><DEDENT>
Dumps tuple of elements to the writer.

:param writer:
:param elem:
:param elem_type:
:param params:
:return: