def split_by_length_of_utterances(self, proportions={}, separate_issuers=False):
        """
        Split the corpus into subsets where the total duration of subsets are proportional to the given proportions.
        The corpus gets splitted into len(proportions) parts, so the number of utterances are
        distributed according to the proportions.

        Args:
            proportions (dict): A dictionary containing the relative size of the target subsets.
                                The key is an identifier for the subset.
            separate_issuers (bool): If True it makes sure that all utterances of an issuer are in the same subset.

        Returns:
            (dict): A dictionary containing the subsets with the identifier from the input as key.

        Example::

            >>> spl = Splitter(corpus)
            >>> corpus.num_utterances
            100
            >>> subsets = spl.split_by_length_of_utterances(proportions={
            >>>     "train" : 0.6,
            >>>     "dev" : 0.2,
            >>>     "test" : 0.2
            >>> })
            >>> print(subsets)
            {'dev': <audiomate.corpus.subview.Subview at 0x104ce7400>,
            'test': <audiomate.corpus.subview.Subview at 0x104ce74e0>,
            'train': <audiomate.corpus.subview.Subview at 0x104ce7438>}
            >>> subsets['train'].num_utterances
            60
            >>> subsets['test'].num_utterances
            20
        """

        utterance_to_duration = {}

        if separate_issuers:
            # Count total length of utterances per issuer
            issuer_utts_total_duration = collections.defaultdict(float)
            issuer_utts = collections.defaultdict(list)

            for utterance in self.corpus.utterances.values():
                issuer_utts_total_duration[utterance.issuer.idx] += utterance.duration
                issuer_utts[utterance.issuer.idx].append(utterance.idx)

            issuer_utts_total_duration = {k: {'duration': int(v)} for k, v in issuer_utts_total_duration.items()}

            # Split with total utt duration per issuer as weight
            issuer_splits = utils.get_identifiers_splitted_by_weights(issuer_utts_total_duration,
                                                                      proportions=proportions)

            # Collect utterances of all issuers per split
            splits = collections.defaultdict(list)

            for split_idx, issuer_ids in issuer_splits.items():
                for issuer_idx in issuer_ids:
                    splits[split_idx].extend(issuer_utts[issuer_idx])
        else:
            for utterance in self.corpus.utterances.values():
                utterance_to_duration[utterance.idx] = {'length': int(utterance.duration * 100)}

            splits = utils.get_identifiers_splitted_by_weights(utterance_to_duration, proportions=proportions)

        return self._subviews_from_utterance_splits(splits)
Split the corpus into subsets where the total duration of subsets are proportional to the given proportions.
        The corpus gets splitted into len(proportions) parts, so the number of utterances are
        distributed according to the proportions.

        Args:
            proportions (dict): A dictionary containing the relative size of the target subsets.
                                The key is an identifier for the subset.
            separate_issuers (bool): If True it makes sure that all utterances of an issuer are in the same subset.

        Returns:
            (dict): A dictionary containing the subsets with the identifier from the input as key.

        Example::

            >>> spl = Splitter(corpus)
            >>> corpus.num_utterances
            100
            >>> subsets = spl.split_by_length_of_utterances(proportions={
            >>>     "train" : 0.6,
            >>>     "dev" : 0.2,
            >>>     "test" : 0.2
            >>> })
            >>> print(subsets)
            {'dev': <audiomate.corpus.subview.Subview at 0x104ce7400>,
            'test': <audiomate.corpus.subview.Subview at 0x104ce74e0>,
            'train': <audiomate.corpus.subview.Subview at 0x104ce7438>}
            >>> subsets['train'].num_utterances
            60
            >>> subsets['test'].num_utterances
            20