Endocytosis in the adaptation to cellular stress