Place 1 pound of assorted stemmed and quartered mushrooms in the bowl of a food processor fitted with a blade attachment and pulse until very finely chopped. Melt 3 tablespoons unsalted butter in a large frying pan over medium heat. When the foaming subsides, add 1/4 cup finely chopped shallots and cook until softened and translucent, about 4 minutes. Reduce heat to low, add chopped mushrooms, and cook, stirring occasionally, until all the liquid has evaporated and the mushrooms have formed a thick paste, about 40 to 50 minutes. Season with salt and freshly ground black pepper, add 2 tablespoons dry sherry, dry port, or Madeira, and cook until evaporated, about 5 minutes.