def notify_user_update_custom_profile_data(user_profile: UserProfile, field: Dict[(str, Union[(int, str, List[int], None)])]) -> None:
    data = dict(id=field['id'])
    if (field['type'] == CustomProfileField.USER):
        data['value'] = ujson.dumps(field['value'])
    else:
        data['value'] = field['value']
    if field['rendered_value']:
        data['rendered_value'] = field['rendered_value']
    payload = dict(user_id=user_profile.id, custom_profile_field=data)
    event = dict(type='realm_user', op='update', person=payload)
    send_event(user_profile.realm, event, active_user_ids(user_profile.realm.id))
def notify_user_update_custom_profile_data(user_profile: UserProfile, field: Dict[(str, Union[(int, str, List[int], None)])]) -> None:
    data = dict(id=field['id'])
    if (field['type'] == CustomProfileField.USER):
        data['value'] = ujson.dumps(field['value'])
    else:
        data['value'] = field['value']
    if field['rendered_value']:
        data['rendered_value'] = field['rendered_value']
    payload = dict(user_id=user_profile.id, custom_profile_field=data)
    event = dict(type='realm_user', op='update', person=payload)
    send_event(user_profile.realm, event, active_user_ids(user_profile.realm.id))