^ That is difficult.
People who are "terminal" (close to death) in hospitals will often be given increased amounts of painkillers to ensure they don't have pain. Such painkillers are, in large amounts, suppressors (they "slow down" important functions in the body, like respiration), so if a person under medical care is in such a situation, they will often be drugged (if it is not against their will), to an extent where they are in a half doze, and at the very and, technically the dose of painkillers can lead to death. It is not considered taking their life when this occurs in a situation where the person would be likely to pass away soon in either case.