A Perth grandmother who lost control of her car after suffering a seizure, causing her to crash into a tree killing her five-year-old granddaughter has been jailed for more than three years.