Prepare the bean filling by adding the water and anise to a small pan and boiling until the infusion is reduced by half. Strain and reserve.
Puree the beans, chiles, garlic, and anise infusion in a blender or food processor.
Melt lard in a heavy skillet or saucepan over high heat. When it’s hot, add the bean puree and reduce to medium heat and allow it to simmer, uncovered, stirring occasionally until the liquid is evaporated. Season to taste with salt and let it cool to room temperature.
To assemble the tamales, unfold the banana leaves or corn husks and wipe them clean with a damp cloth. Pat dry. Trim leaves into 12 to 14 rectangles using kitchen shears – 14 by 11 inches each – while saving some of the longer trimmings for ties.
Mix the Maseca corn flour with enough of the warm chicken stock to make a mixture that’s soft, but not sticky. Beat lard in a separate bowl on medium speed until light and fluffy. Add the Maseca mixture and pumpkin puree to the lard in a couple batches, beating on medium speed and scraping the bowl as needed, until incorporated and light as butter cream.
Beat in cinnamon, brown sugar, and salt to taste.
Place one or two leaf or husk rectangles on the counter and place 2/3 to 1 cup of Maseca mixture in the center and spread with a spatula into a 1/2-inch-thick oval.
Place 1 heaping tablespoon of the bean filling in the center of the oval and fold the left and right edges toward the center so they overlap slightly. Do the same with the top and bottom edges.
Once you’ve made neat, flat packages tied with the leftover trimming strings, steam the tamales for 45 to 50 minutes.