def bot_owner_user_ids(user_profile: UserProfile) -> Set[int]:
    is_private_bot = ((user_profile.default_sending_stream and user_profile.default_sending_stream.invite_only) or (user_profile.default_events_register_stream and user_profile.default_events_register_stream.invite_only))
    if is_private_bot:
        return {user_profile.bot_owner_id}
    else:
        users = {user.id for user in user_profile.realm.get_human_admin_users()}
        users.add(user_profile.bot_owner_id)
        return users
def bot_owner_user_ids(user_profile: UserProfile) -> Set[int]:
    is_private_bot = ((user_profile.default_sending_stream and user_profile.default_sending_stream.invite_only) or (user_profile.default_events_register_stream and user_profile.default_events_register_stream.invite_only))
    if is_private_bot:
        return {user_profile.bot_owner_id}
    else:
        users = {user.id for user in user_profile.realm.get_human_admin_users()}
        users.add(user_profile.bot_owner_id)
        return users