docs: def bucket(self, experiment, user_id, bucketing_id):
      """ For a given experiment and bucketing ID determines variation to be shown to user.
  
      Args:
        experiment: Object representing the experiment for which user is to be bucketed.
        user_id: ID for user.
        bucketing_id: ID to be used for bucketing the user.
  
      Returns:
        Variation in which user with ID user_id will be put in. None if no variation.
      """
  
      if not experiment:
        return None
  
      # Determine if experiment is in a mutually exclusive group
      if experiment.groupPolicy in GROUP_POLICIES:
        group = self.config.get_group(experiment.groupId)
  
        if not group:
          return None
  
        user_experiment_id = self.find_bucket(bucketing_id, experiment.groupId, group.trafficAllocation)
        if not user_experiment_id:
          self.config.logger.info('User "%s" is in no experiment.' % user_id)
          return None
  
        if user_experiment_id != experiment.id:
          self.config.logger.info('User "%s" is not in experiment "%s" of group %s.' % (
            user_id,
            experiment.key,
            experiment.groupId
          ))
          return None
  
        self.config.logger.info('User "%s" is in experiment %s of group %s.' % (
          user_id,
          experiment.key,
          experiment.groupId
        ))
  
      # Bucket user if not in white-list and in group (if any)
      variation_id = self.find_bucket(bucketing_id, experiment.id, experiment.trafficAllocation)
      if variation_id:
        variation = self.config.get_variation_from_id(experiment.key, variation_id)
        self.config.logger.info('User "%s" is in variation "%s" of experiment %s.' % (
          user_id,
          variation.key,
          experiment.key
        ))
        return variation
  
      self.config.logger.info('User "%s" is in no variation.' % user_id)
      return None