Reference for Chullin 4:3
בְּהֵמָה שֶׁמֵּת עֻבָּרָהּ בְּתוֹךְ מֵעֶיהָ וְהוֹשִׁיט הָרוֹעֶה אֶת יָדוֹ וְנָגַע בּוֹ, בֵּין בִּבְהֵמָה טְמֵאָה, בֵּין בִּבְהֵמָה טְהוֹרָה, טָהוֹר. רַבִּי יוֹסֵי הַגְּלִילִי אוֹמֵר, בִּטְמֵאָה, טָמֵא, וּבִטְהוֹרָה, טָהוֹר. הָאִשָּׁה שֶׁמֵּת וְלָדָהּ בְּתוֹךְ מֵעֶיהָ וּפָשְׁטָה חַיָּה אֶת יָדָהּ וְנָגְעָה בוֹ, הַחַיָּה טְמֵאָה טֻמְאַת שִׁבְעָה, וְהָאִשָּׁה טְהוֹרָה עַד שֶׁיֵּצֵא הַוָּלָד:
An animal whose fetus died within its womb and the shepherd placed his hand inside and touched it, whether it is an impure animal or pure animal, he is pure. Rabbi Yose Ha'Gelilli says, “For an impure [animal], he is impure, but for a pure [animal], he is pure.” A woman whose fetus died in her womb and the midwife placed her hand inside and touched it, the midwife is impure with a seven day impurity, and the mother is pure until the fetus comes out.