<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def random_subsets(self, relative_sizes, by_duration=False, balance_labels=False, label_list_ids=None):
 """ Create a bunch of subsets with the given sizes relative to the size or duration of the full corpus. Basically the same as calling ``random_subset`` or ``random_subset_by_duration`` multiple times with different values. But this method makes sure that every subset contains only utterances, that are also contained in the next bigger subset. Args: relative_sizes (list):
 A list of numbers between 0 and 1 indicating the sizes of the desired subsets, relative to the full corpus. by_duration (bool):
 If True the size measure is the duration of all utterances in a subset/corpus. balance_labels (bool):
 If True the labels contained in a subset are chosen to be balanced as far as possible. label_list_ids (list):
 List of label-list ids. If none is given, all label-lists are considered for balancing. Otherwise only the ones that are in the list are considered. Returns: dict : A dictionary containing all subsets with the relative size as key. """

        resulting_sets = {}
        next_bigger_subset = self.corpus

        for relative_size in reversed(relative_sizes):
            generator = SubsetGenerator(next_bigger_subset, random_seed=self.random_seed)

            if by_duration:
                sv = generator.random_subset_by_duration(relative_size, balance_labels=balance_labels,
                                                         label_list_ids=label_list_ids)
            else:
                sv = generator.random_subset(relative_size, balance_labels=balance_labels,
                                             label_list_ids=label_list_ids)

            resulting_sets[relative_size] = sv

        return resulting_sets