def try_update_realm_custom_profile_field(realm: Realm, field: CustomProfileField, name: str, hint: str='', field_data: Optional[ProfileFieldData]=None) -> None:
    field.name = name
    field.hint = hint
    if ((field.field_type == CustomProfileField.CHOICE) or (field.field_type == CustomProfileField.EXTERNAL_ACCOUNT)):
        field.field_data = ujson.dumps((field_data or {}))
    field.save()
    notify_realm_custom_profile_fields(realm, 'update')
def try_update_realm_custom_profile_field(realm: Realm, field: CustomProfileField, name: str, hint: str=, field_data: Optional[ProfileFieldData]=None) -> None:
    field.name = name
    field.hint = hint
    if ((field.field_type == CustomProfileField.CHOICE) or (field.field_type == CustomProfileField.EXTERNAL_ACCOUNT)):
        field.field_data = ujson.dumps((field_data or {}))
    field.save()
    notify_realm_custom_profile_fields(realm, 'update')