def _parse_variants(self, variants):
        if not len(variants):
            variants = [('True', True), ('False', False)]

        if len(variants) == 1:
            raise RuntimeError(
                'Experiments must have at least two variants '
                '(a control and an alternative).'
            )

        def add_defaults(v):
            if len(v) < 3:
                v = tuple(
                    list(v) + (
                        [None, 1] if len(v) == 1 else [1]
                    )
                )

            # Perform some minimal type checking
            if not isinstance(v[0], string_types):
                raise RuntimeError(
                    'Invalid variant name: %s must be a string.' %
                    v[0]
                )
            if not isinstance(v[2], int):
                raise RuntimeError(
                    'Invalid variant weight: %s must be an integer.' %
                    v[2]
                )

            return v

        variants = map(
            add_defaults,
            variants
        )

        return zip_longest(*variants)
dataset/ETHPy150Open ryanpetrello/cleaver/cleaver/base.py/Cleaver._parse_variants/original