Reference for Sanhedrin 3:4
וְאֵלּוּ הֵן הַקְּרוֹבִין, אָבִיו וְאָחִיו וַאֲחִי אָבִיו וַאֲחִי אִמּוֹ וּבַעַל אֲחוֹתוֹ וּבַעַל אֲחוֹת אָבִיו וּבַעַל אֲחוֹת אִמּוֹ וּבַעַל אִמּוֹ וְחָמִיו וְגִיסוֹ, הֵן וּבְנֵיהֶן וְחַתְנֵיהֶן, וְחוֹרְגוֹ לְבַדּוֹ. אָמַר רַבִּי יוֹסֵי, זוֹ מִשְׁנַת רַבִּי עֲקִיבָא. אֲבָל מִשְׁנָה רִאשׁוֹנָה, דּוֹדוֹ וּבֶן דּוֹדוֹ. וְכָל הָרָאוּי לְיָרְשׁוֹ, וְכָל הַקָּרוֹב לוֹ בְּאוֹתָהּ שָׁעָה. הָיָה קָרוֹב וְנִתְרַחֵק, הֲרֵי זֶה כָּשֵׁר. רַבִּי יְהוּדָה אוֹמֵר, אֲפִלּוּ מֵתָה בִתּוֹ וְיֶשׁ לוֹ בָנִים מִמֶּנָּה, הֲרֵי זֶה קָרוֹב:
And these are the (invalidated) kin (vis-à-vis judging and testifying): his father, his brother, his father's brother, his mother's brother, his sister's husband, [the husband being like his wife], his mother's sister's husband, his mother's husband, his father-in-law, his brother-in-law [i.e., the husband of his wife's sister] — they, their sons, and their sons-in-law. [Only sons and daughters that his brother-in-law has from his wife's sister. But if he has sons from another wife, or sons-in-law married to daughters from another wife, they are not considered kin.] And his stepson alone [is considered kin, but not his stepson's son or his stepson's son-in-law. And he may not testify for his stepson's wife, for a woman is like her husband. And brothers, one vis-à-vis the other, whether from the father or from the mother, are first (of kin) in (i.e., vis-à-vis) first. Their sons, vis-à-vis each other are second in second. And the sons of their sons, vis-à-vis each other, are third in third. Third in first is always kasher, and it goes without saying, third in second. But second in second, and, it goes without saying, second in first, are both pasul (unfit). And just as you reckon for males, so you reckon for females. And every woman that you are pasul to, you are pasul to her husband. And every man that you are pasul to, you are pasul to his wife.] R. Yossi said: This is the Mishnah of R. Akiva, but an earlier Mishnah (reckons as invalidated kin) his uncle and his uncle's son. [The halachah is not in accordance with the earlier Mishnah.] And (also pasul are) all who are fit to inherit him [This is the conclusion of the Mishnah of R. Akiva and not of the earlier Mishnah. ("all who are fit to inherit him:") i.e., the father's kin. But the mother's kin, such as "his mother's brother" above, are kasher (to testify) for him. For his mother's brother is not fit to inherit him. He, however, is fit to inherit his mother's brother, for which reason he is pasul to testify for him.] and all who are kin to him at that time (the time of the testimony). If he were (once) kin [e.g., his son-in-law, who is fit to inherit him by reason of his (the son-in-law's) wife], and he became removed, [his wife having died before he witnessed this (matter of potential) testimony], he is kasher. R. Yehudah says: Even if his daughter died, but he had children from her, he is (considered) kin. [The halachah is not in accordance with R. Akiva.]