Facing a massive securities class action with little cash in its coffers, nut distributor Diamond Foods was in a tight spot this fall.

The company’s lawyers at Fenwick & West struck a settlement that appeased plaintiffs before the case entered a phase of expensive discovery, and allowed Diamond to move forward with its plans for a turnaround.