def deferred_class_factory(model, attrs):
    class Meta:
        proxy = True
        app_label = model._meta.app_label

    # The app_cache wants a unique name for each model, otherwise the new class
    # won't be created (we get an old one back). Therefore, we generate the
    # name using the passed in attrs. It's OK to reuse an existing class
    # object if the attrs are identical.
    name = "%s_Deferred_%s" % (model.__name__, '_'.join(sorted(list(attrs))))
    name = util.truncate_name(name, 80, 32)

    overrides = dict([(attr, DeferredAttribute(attr, model))
            for attr in attrs])
    overrides["Meta"] = Meta
    overrides["__module__"] = model.__module__
    overrides["_deferred"] = True
    return type(name, (model,), overrides)

# The above function is also used to unpickle model instances with deferred
# fields.
Calculate the relative time from given timestamp to another given (epoch) or now.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/db/models/query_utils.py/deferred_class_factory--crossover with--dataset/ETHPy150Open FichteFoll/FileHistory/file_history.py/OpenRecentlyClosedFileCommand.approximate_age