def all_enabled(user=None):
 features = FeatureState.get_all(_world)
 active = {}
 for feature in features:
  experiment = feature.config.get('experiment')
  if (experiment and FeatureState.is_user_experiment(experiment)):
   variant = feature.variant(user)
   if variant:
    active[feature.name] = {'experiment_id': experiment.get('experiment_id'), 'variant': variant}
  elif feature.is_enabled(user):
   active[feature.name] = True
 return active

def all_enabled ( user = None ) : features = FeatureState . get_all ( _world ) active = { } for feature in features : experiment = feature . config . get ( 'experiment' ) if ( experiment and FeatureState . is_user_experiment ( experiment ) ) : variant = feature . variant ( user ) if variant : active [ feature . name ] = { 'experiment_id' : experiment . get ( 'experiment_id' ) , 'variant' : variant } elif feature . is_enabled ( user ) : active [ feature . name ] = True return active
return a list of enabled features and experiments for the user .