'Construct a FeatureProfile object from a integer bitfield.
>>> FeatureProfile.from_int(0x42)
FeatureProfile([(\'apps\', False), (\'packaged_apps\', True), ...)'

@classmethod
def from_int(cls, features, limit=None):

    instance = cls()
    if (limit is None):
        limit = len(APP_FEATURES)
    app_features_to_consider = OrderedDict(itertools.islice(APP_FEATURES.iteritems(), limit))
    for (i, k) in enumerate(reversed(app_features_to_consider)):
        instance[k.lower()] = bool((features & (1 << i)))
    return instance
