def METHOD_NAME(apps, project, user):
    User = apps.get_model('siteapp', 'User')
    UserObjectPermission = apps.get_model('guardian', 'UserObjectPermission')
    Permission = apps.get_model('auth', 'Permission')
    project_type, created = ContentType.objects.get_or_create(
        app_label='siteapp', model='project')
    view_project, created = Permission.objects.get_or_create(codename='view_project', content_type_id=project_type.id)
    change_project, created = Permission.objects.get_or_create(codename='change_project', content_type_id=project_type.id)
    add_project, created = Permission.objects.get_or_create(codename='add_project', content_type_id=project_type.id)
    delete_project, created = Permission.objects.get_or_create(codename='delete_project', content_type_id=project_type.id)
    permissions = [view_project, change_project, add_project, delete_project]
    user_lookup = User.objects.get(id=user.id)
    for perm in permissions:
        UserObjectPermission.objects.get_or_create(
            permission=perm, user=user_lookup, object_pk=project.pk, content_type_id=project_type.id)