docs: def get_variation_for_rollout(self, rollout, user_id, attributes=None):
      """ Determine which experiment/variation the user is in for a given rollout.
      Returns the variation of the first experiment the user qualifies for.
  
      Args:
        rollout: Rollout for which we are getting the variation.
        user_id: ID for user.
        attributes: Dict representing user attributes.
  
      Returns:
        Decision namedtuple consisting of experiment and variation for the user.
      """
  
      # Go through each experiment in order and try to get the variation for the user
      if rollout and len(rollout.experiments) > 0:
        for idx in range(len(rollout.experiments) - 1):
          experiment = self.config.get_experiment_from_key(rollout.experiments[idx].get('key'))
  
          # Check if user meets audience conditions for targeting rule
          if not audience_helper.is_user_in_experiment(self.config, experiment, attributes, self.logger):
            self.logger.debug('User "%s" does not meet conditions for targeting rule %s.' % (
              user_id,
              idx + 1
            ))
            continue
  
          self.logger.debug('User "%s" meets conditions for targeting rule %s.' % (user_id, idx + 1))
          # Determine bucketing ID to be used
          bucketing_id = self._get_bucketing_id(user_id, attributes)
          variation = self.bucketer.bucket(experiment, user_id, bucketing_id)
          if variation:
            self.logger.debug('User "%s" is in variation %s of experiment %s.' % (
              user_id,
              variation.key,
              experiment.key
            ))
            return Decision(experiment, variation, enums.DecisionSources.ROLLOUT)
          else:
            # Evaluate no further rules
            self.logger.debug('User "%s" is not in the traffic group for the targeting else. '
                              'Checking "Everyone Else" rule now.' % user_id)
            break
  
        # Evaluate last rule i.e. "Everyone Else" rule
        everyone_else_experiment = self.config.get_experiment_from_key(rollout.experiments[-1].get('key'))
        if audience_helper.is_user_in_experiment(self.config,
                                                 self.config.get_experiment_from_key(rollout.experiments[-1].get('key')),
                                                 attributes,
                                                 self.logger):
          # Determine bucketing ID to be used
          bucketing_id = self._get_bucketing_id(user_id, attributes)
          variation = self.bucketer.bucket(everyone_else_experiment, user_id, bucketing_id)
          if variation:
            self.logger.debug('User "%s" meets conditions for targeting rule "Everyone Else".' % user_id)
            return Decision(everyone_else_experiment, variation, enums.DecisionSources.ROLLOUT)
  
      return Decision(None, None, enums.DecisionSources.ROLLOUT)