def get_obj_base_key(obj):
    """
    Returns a simple immutable value to easily hash model instances.

    This allows time and memory efficient object comparisons.
    """
    # base model = the non-abstract model class highest up the inheritance chain
    base_model = ([obj._meta.model] + obj._meta.get_parent_list())[-1]
    return base_model._meta.label, obj.pk