Netflix has nabbed the worldwide rights to “Barry,’’ the film about the young Barack Obama directed by Vikram Gandhi and written by Newton native Adam Mansbach. The film had its world premiere last week at the Toronto International Film Festival, where it got an enthusiastic response. The movie, starring Devon Terrell (inset) as Obama, focuses on the future president as a college student in New York. “The film is rooted in the murky, drifting, sleep-late-and-get-stoned-and-do-whatever nature of college life that the movies almost never get right. This one does, and that’s one reason it feels bracingly authentic,’’ Variety wrote in its review. Mansbach, the writer, is perhaps best known for writing “Go the F**k to Sleep,’’ the 32-page adult bedtime book that for a time was No. 1 on Amazon.com.