def split(self, experiment_name, *variants):
        """
        Used to split and track user experience amongst one or more variants.

        :param experiment_name a unique string name for the experiment
        :param *variants can take many forms, depending on usage.

            Variants should be provided as arbitrary tuples in the
            format ('unique_string_label', any_value), ... e.g.,

            >>> split('text_color', ('red', '#F00'), ('blue', '#00F'))

            ...where the first variant (in this example, 'red') represents the
            control and any additional variants represent alternatives.

            By default, variants are chosen with equal weight.  You can tip the
            scales if you like by passing a proportional *integer* weight as
            the third element in each variant tuple:

            >>> split('text_color', ('red', '#F00', 2), ('blue', '#00F', 4))

            Optionally, variants may be excluded entirely to fall back to
            a simple True/False 50/50 split, where True is the control and
            False is the experiment, e.g.,

            >>> sidebar() if split('include_sidebar') else empty()

        """
        # Perform some minimal type checking
        if not isinstance(experiment_name, string_types):
            raise RuntimeError(
                'Invalid experiment name: %s must be a string.' %
                experiment_name
            )

        keys, values, weights = self._parse_variants(variants)
        b = self._backend

        # Record the experiment if it doesn't exist already
        experiment = b.get_experiment(experiment_name, keys)

        # If the current visitor hasn't been verified as a human, and we've not
        # required human verification, go ahead and mark them as a human.
        if self.count_humans_only is False and self.human is not True:
            b.mark_human(self.identity)

        if experiment is None:
            b.save_experiment(experiment_name, keys)
            experiment = b.get_experiment(experiment_name, keys)
        else:
            if set(experiment.variants) != set(keys):
                raise RuntimeError(
                    'An experiment named %s already exists with different '
                    'variants.' % experiment_name
                )

        # Retrieve the variant assigned to the current user
        if self._environ.get('cleaver.override', {}) in experiment.name:
            variant = self._environ['cleaver.override'][experiment.name]
        else:
            variant = b.get_variant(self.identity, experiment.name)
            if variant is None:
                # ...or choose (and store) one randomly if it doesn't exist yet
                variant = next(util.random_variant(keys, weights))
                b.participate(self.identity, experiment.name, variant)

        return dict(zip(keys, values))[variant]
dataset/ETHPy150Open ryanpetrello/cleaver/cleaver/base.py/Cleaver.split/swapped operands of `in`