def get_instance(app_label, model, pk):
    """Return an instance given its app_label, model name and private key."""
    from django.contrib.contenttypes import models as ct_models
    model = ct_models.ContentType.objects.get(app_label=app_label, model=model)
    return model.get_object_for_this_type(pk=pk)
