HOLLYWOOD (CBSLA.com) — Andy Marx says he had a writing teacher who gave him the classic and standard advice: Write about what you know. Moreover, the teacher said to “write the book you would want to read.”

To that end, he decided to write a book inspired by his two famous and legendary grandfathers: songwriter Gus Kahn and comic Groucho Marx.

READ MORE: Foo Fighters Announce 2022 Tour With Shows At Banc Of California Stadium

“My two grandfathers actually worked together on movies at MGM,” Marx told CBS2’s entertainment reporter Suzanne Marques.

Maternal grandfather Kahn, best known for writing songs like “Toot, Toot, Tootsie,” “Dream A Little Dream,” “It Had to Be You,” “Yes Sir, That’s My Baby” and “Makin’ Whoopee,” and paternal grandad Marx, member of the famed comedy troupe, the Marx Brothers, inspired Andy Marx’s new book, “Royalties, which is set in the early 20th century.

Huffington Post called “Royalties,” a “historic fiction …  and fun summer reading experience.”

“Groucho came out of vaudeville,” Marx says. “Gus Kahn came out of Tin Pan Alley.”

Kahn wrote music for major motion pictures and became so famous that a movie was made about him.

“It was called ‘I’ll See You In My Dreams’ “, Marx says. “In 1951. It starred Danny Thomas and Doris Day.”

READ MORE: At Least One Dead Following Chatsworth Fire

His paternal grandfather, meanwhile, was starring in movies. One of America’s favorite comics, Groucho was known for his signature mustache and biting, quick wit.

Groucho was also seen as the lead of five acting brothers, although only three, Groucho, Chico and Harpo, appeared in all of the movies. Gummo never appeared in the movies, and Zeppo only appeared in the first handful.

After the movies, Groucho found popularity in TV as well.

Marx, who has worked as a magazine writer and unit publicist for films like “The Terminator” and “Out of Bounds,” showed Marques some of the family memorabilia he owns.

“This is probably one of the oldest pieces of Marx memorabilia that exists. It’s from 1924, they were playing in a place called the Casino Theater in New York. It’s when they basically made the leap from vaudeville to Broadway.”

Marx said his father, Arthur Marx, and Groucho were not particularly close.

“It got very contentious at times,” Marx says. “They didn’t speak for years. I didn’t have that with my grandfather. There’s that joke about the grandchildren and the grandparents having a common enemy, which is the parents.”

MORE NEWS: Authorities Searching For Missing Teen Jasyre "Eli" Robinson, Last Seen November 23

When he’s not writing books, Marx is editor-in-chief and co-founder of the Hollywood & Swine website. On the well-regarded parody site, he makes fun of pop culture and news headlines.