Place pumpkin, green gram, ground turmeric, minced garlic and enough water in a pressure cooker. Pressure cook for 5-6 whistles. When pressure has cooled down, open it, and lightly mash the pumpkin using a large spoon. Set aside.
Meanwhile, place grated coconut, green chilies, and cumin seeds in the bowl of a food processor. Add enough water, and process to a smooth paste. Set aside.
Transfer cooked pumpkin to a large pan. Place it over medium-high heat. Add ground coconut to pumpkin. Stir well. Add a little water if the mixture is too thick. Season with salt. Cover, cook, for 3-4 minutes. Remove from flame.
Meanwhile heat oil in a fry pan. Splutter mustard seeds. Add shallots, dried red chilies, coconut (if using) and curry leaves. Saute, stirring occasionally, until shallots turn golden brown. Remove from heat.
Add tempered spices to pumpkin erissery. Mix well. Serve hot with rice.
Notes
You can substitute green gram with dried red beans or adjuki beans While tempering, you can also add 2 tablespoon grated coconut . It adds a crunch to the curry.