def METHOD_NAME(model):
    # We import it locally because this file is loaded before apps are ready.
    from django.contrib.contenttypes.models import ContentType
    return ContentType.objects.get_for_model(model).pk