def write_signatures(self, signatures):
        """Write signature data to the MAR file.

        Args:
            signatures (list): list of signature tuples of the form
                (algorithm_id, signature_data)

        """
        self.fileobj.seek(self.signature_offset)
        sig_entries = [dict(algorithm_id=id_,
                            size=len(sig),
                            signature=sig)
                       for (id_, sig) in signatures]

        sigs = sigs_header.build(dict(
            filesize=self.filesize,
            count=len(signatures),
            sigs=sig_entries,
        ))
        self.fileobj.write(sigs)
        signatures_len = len(sigs)
        self.additional_offset = self.signature_offset + signatures_len
        # sanity check; this should never happen
        if not self.additional_offset == self.fileobj.tell():  # pragma: no cover
            raise IOError('ended up at unexpected offset')
Write signature data to the MAR file.

        Args:
            signatures (list): list of signature tuples of the form
                (algorithm_id, signature_data)