Shaping the endoplasmic reticulum into the nuclear envelope