def METHOD_NAME(self, user, kc_user=None, is_superuser=False, delete=False):
    # map a kc user to a django user
    if not kc_user:
        kc_user = self._get_kc_user(user)
    user_auth_level = self.auth_service.get_auth_level(kc_user)
    if user_auth_level == AuthorizationLevel.ADMIN:
        is_superuser = True
    # update the superuser and staff status of the user
    user.is_staff = is_superuser
    user.is_superuser = is_superuser
    user.username = kc_user.get("username", kc_user["email"])
    user.first_name = kc_user.get("firstName", "")
    user.last_name = kc_user.get("lastName", "")
    user.email = kc_user.get("email", "")
    user.is_active = kc_user.get("enabled", delete)
    return user