[And Jacob called to his sons and said: Gather yourselves (Gen. 49:1).] Rabbi Pinhas the Priest bar Hama and Rabbi Judah the Levite bar Shallum said: What is the meaning of "Gather yourselves"? Be purified, just as you say, "Let her be shut up seven days outside the camp, and afterward let her be gathered in" (Numbers 12:14).
Jacob Tells His Sons Gather Yourselves and Be Purified
Midrash Tanchuma Buber, Vayechi 11:1
[ויקרא יעקב אל בניו ויאמר האספו] ר' פנחס הכהן בר חמא ור' יהודה הלוי בר שלום אמרו מהו האספו, הטהרו, כשם שאתה אומר תסגר שבעת ימים מחוץ למחנה ואחר תאסף (במדבר יב יד).