The legislation will allow medically assisted suicide in certain limited circumstances.