BEVERLY HILLS, Calif. — Henry Louis Gates Jr., the host of “Finding Your Roots” on PBS, says the show “couldn’t have scripted” the discovery that actor, comedian Larry David and Senator Bernie Sanders are related.

An episode where the two learn they’re distant relatives will air on the show’s upcoming fourth season, premiering Oct. 3.

David has impersonated Sanders on “Saturday Night Live.”

Gates spoke about the discovery Monday during a panel about his show as part of the Television Critics Association’s annual summer press gathering.

He said Sanders and David share “identical DNA” of three chromosomes and “that’s a lot of matches.”

Last week, David told TV critics that Sanders is a “third cousin or something” while promoting the return of “Curb Your Enthusiasm” to HBO.