def METHOD_NAME(
    user_profile: UserProfile, *, acting_user: Optional[UserProfile]
) -> None:
    assert user_profile.bot_owner is not None
    new_owner_subscribed_private_streams = get_subscribed_private_streams_for_user(
        user_profile.bot_owner
    )
    new_owner_subscribed_private_stream_ids = [
        stream.id for stream in new_owner_subscribed_private_streams
    ]
    bot_subscribed_private_streams = get_subscribed_private_streams_for_user(user_profile)
    bot_subscribed_private_stream_ids = [stream.id for stream in bot_subscribed_private_streams]
    stream_ids_to_unsubscribe = set(bot_subscribed_private_stream_ids) - set(
        new_owner_subscribed_private_stream_ids
    )
    unsubscribed_streams = [
        stream
        for stream in bot_subscribed_private_streams
        if stream.id in stream_ids_to_unsubscribe
    ]
    bulk_remove_subscriptions(
        user_profile.realm, [user_profile], unsubscribed_streams, acting_user=acting_user
    )