def METHOD_NAME(sm: SMInstance, my_ds_id):
    old_ds = sm.dataset(id=my_ds_id)
    new_adducts = ['+H'] if old_ds.adducts != ['+H'] else ['+K']
    assert old_ds.status == 'FINISHED'
    sm.update_dataset(id=my_ds_id, adducts=new_adducts)
    # Wait for dataset to change status
    attempts = 0
    while sm.dataset(id=my_ds_id).status != 'FINISHED' and attempts < 10:
        time.sleep(1)
        attempts += 1
    assert sm.dataset(id=my_ds_id).status in ('QUEUED', 'ANNOTATING')