code: def validate_feature (name):
      
      assert isinstance(name, basestring)
      if name not in __all_features:
          raise InvalidFeature ("'%s' is not a valid feature name" % name)
      else:
          return __all_features[name]
docs: Checks if all name is a valid feature. Otherwise, raises an exception.