 Meanwhile, at the Stamford branch, Jim Halpert (John Krasinski) and Andy Bernard (Ed Helms) get drunk while working late, leading Karen Filippelli (Rashida Jones) to give Jim a ride home.Kaling and executive producer Greg Daniels came up with the episode idea after Kaling held a Diwali party in 2005 for series staff.She undertook research about Indian culture and the resulting episode was substituted in place of one that would have been Halloween-themed.