Every year in late summer and early fall, the chile en nogada makes its brief run through Mexico.

The star ingredients, walnuts and pomegranate seeds, are not available any other time of the year. So it’s a festive time. Restaurant storefronts become festooned with “We have chiles en nogada!” banners. Pomegranates glitter at the tianguis. Mexican Independence Day is right around the corner (on Sept. 16), and the dish is pretty much the culinary centerpiece of the celebration.

To me, the most interesting thing about chiles en nogada is that it’s a living piece of Mexican history. Puebla nuns invented the dish in 1821, to honor a visit by Mexican General Augustín de Iturbide. The dish featured the colors of the Mexican flag: a poblano chile stuffed with dried fruits and nuts, covered in creamy walnut sauce (white) and sprinkled with pomegranate seeds and parsley (red and green). The Mexican flag was unveiled around the same period, so you can imagine the patriotic fervor.

Today, the chile en nogada sounds awfully baroque. Fruity meat? Pomegranate seeds? Who would eat that? At the time, however, nogada sauce was popular. And so was the idea of combining dozens of ingredients to create a complicated, tedious dish. (The Pueblan nuns also invented mole.)

Chiles en nogada is not an easy dish, and it’s not meant to be. That’s part of the tradition. Walnuts must be peeled. Spices assembled. Raw and dried fruit, chopped. Even after assembling your chile, you must dunk it in egg batter and fry it.

In the olden days, the nuns didn’t have blenders, so they ground the walnut sauce on the metate. As someone who has done her fair share of metate-grinding, I can tell you that it had to take entire days of grinding to get the texture they wanted. Let me repeat that: days of grinding.

Last week, I took a chiles en nogada course at the Escuela de Gastronomía Mexicana, where I’m currently studying for a diploma in Especialización de Gastronomía Mexicana.

Yuri de Gortari, who teaches cooking in my diploma program, taught the chile course. Since there was so much worked involved, he decided to conduct most of the course as a demonstration. By the time we arrived his kitchen assistants had already roasted, seeded and de-veined the chiles, and chopped all the fruit and measured out the spices.

It was kind of like being on the Mexican version of Barefoot Contessa.