def write_realm_audit_log_entry(user_profile: Any, event_time: Any, event_type: Any, affected_user_type: str) -> None:
    RealmAuditLog.objects.create(realm=user_profile.realm, modified_user=user_profile, event_type=event_type, event_time=event_time, extra_data=ujson.dumps({'migration_id': MIGRATION_ID, 'affected_user_type': affected_user_type}))
def write_realm_audit_log_entry(user_profile: Any, event_time: Any, event_type: Any, affected_user_type: str) -> None:
    RealmAuditLog.objects.create(realm=user_profile.realm, modified_user=user_profile, event_type=event_type, event_time=event_time, extra_data=ujson.dumps({'migration_id': MIGRATION_ID, 'affected_user_type': affected_user_type}))