Splits the list of SeqRecordExpanded objects into lists, which are
        kept into a bigger list.

        If the file_format is Nexus, then it is only partitioned by gene. If it
        is FASTA, then it needs partitioning by codon positions if required.

        Example:

            >>> blocks = [
            ...     [SeqRecord1, SeqRecord2],  # for gene 1
            ...     [SeqRecord1, SeqRecord2],  # for gene 2
            ...     [SeqRecord1, SeqRecord2],  # for gene 3
            ...     [SeqRecord1, SeqRecord2],  # for gene 4
            ... ]

def split_data(self):
        """Splits the list of SeqRecordExpanded objects into lists, which are
        kept into a bigger list.

        If the file_format is Nexus, then it is only partitioned by gene. If it
        is FASTA, then it needs partitioning by codon positions if required.

        Example:

            >>> blocks = [
            ...     [SeqRecord1, SeqRecord2],  # for gene 1
            ...     [SeqRecord1, SeqRecord2],  # for gene 2
            ...     [SeqRecord1, SeqRecord2],  # for gene 3
            ...     [SeqRecord1, SeqRecord2],  # for gene 4
            ... ]

        """
        this_gene_code = None
        for seq_record in self.data.seq_records:
            if this_gene_code is None or this_gene_code != seq_record.gene_code:
                this_gene_code = seq_record.gene_code
                self._blocks.append([])
            list_length = len(self._blocks)
            self._blocks[list_length - 1].append(seq_record)