Heat 1/2 teaspoon oil in a large skillet over medium-high heat. Add shallots or onions and cook, stirring, until starting to lightly brown, about 30 seconds. Add mushrooms and cook, stirring frequently, until their liquid is almost evaporated, 4 to 5 minutes. Add sage, salt and pepper and cook, stirring, for 2 minutes more. Add sherry if using, scraping up any browned bits, and cook until the liquid evaporates, 2 to 3 minutes.
Transfer the mixture to a food processor. Add the remaining oil, walnuts and nutritional yeast (or Parmesan) and pulse until very finely chopped, about 30 seconds. Serve garnished with sage.