Maymon said the seed of the film was the death of his ex-boyfriend's elderly grandmother.
"We felt like death released her from pain and suffering — but then the paramedics came into the house and tried to resuscitate her for half an hour," the director said during an interview in Venice. "They were fighting for her life like she was 16 years old. It was so absurd, and from this absurd moment the idea came.
"There was a funny moment when her son told the paramedics: 'If you wake her up, you are taking her with you.'"
The directors know not everyone will find that funny. Granit said some people had been scandalized by the idea for their film.
"They told us, 'How can you laugh about such a thing?'" she said.
"But we really believed in this movie, what it says. It's very important for us to raise these questions."
And, she said, "We love to take risks."
Maymon and Granit have a record of tackling tough social issues with humor in their three previous shorts and one feature, "Mortgage," about a couple battling to save their home at any cost.
The script for "The Farewell Party" won the "best pitch" award at the Berlin Film Festival, but finding a producer proved tricky in Germany, where many oppose assisted suicide because of its association with Nazi euthanasia programs.
Even when the money was in place, casting also had its glitches.
The protagonists in "The Farewell Party" are played by well-known Israeli actors, including veteran comedian Ze'ev Revah as Yehezkel, the amateur inventor of the mercy-killing machine.
Maymon said Revah consulted his rabbi before agreeing to take the part. Some other actors didn't show up for auditions.
"It was very hard for them to deal with this subject because they are old and they felt that it's too close for them," he said.
Israel's film industry is vibrant for a country its size, but the Israeli-Palestinian conflict sometimes shadows its productions on the international stage.
Another Israeli-funded film at the festival, "Villa Touma," is at the center of a political spat after Israeli Arab director Suha Arraf submitted it as a Palestinian entry, sparking calls in Israel for the director to give the Israeli money back.