Hermie and Ray. (HBO)

This past Sunday's episode of Girls was a little heart-wrenching towards the end, when Ray discovers his friend, mentor and boss Hermie (played by Colin Quinn) dead in his apartment. The decision to do this, co-showrunner Jenni Konner told The Hollywood Reporter, came from a real life tragedy: Garry Shandling's death last year.

When asked about that moment in the episode, Konner said:

Honestly, the truth was that Judd lost Garry Shandling, who was one of his closest friends and his mentor, and it just seeped into everything. It seeped into our creativity. It was a real time of loss for Judd. I don't know exactly how it came up, but that's where it came from.

Girls producer Judd Apatow was particularly affected by the death, and has been sharing photos and experiences about his close friend on social media as he works on a documentary about the comedian.

Garry in full Sanders costume!

A post shared by Judd Apatow (@juddapatow) on