Prepare the Spiny Gourd: Wash the spiny gourds thoroughly. Cut off the top and bottom ends, then slice them in half lengthwise. If the seeds are hard and mature, scoop them out. For tender gourds, you can leave the seeds in. Soak the cut spiny gourds in a bowl of water.
Make the Masala Paste: In a grinder, combine the grated coconut, chopped onion, tomato, garlic cloves, green chillies, ginger, a small amount of cumin seeds, and fresh coriander leaves. Grind to a smooth paste, adding a little water if necessary.
Saute the Masala: Heat oil in a pressure cooker or a pan over medium heat. Add the mustard seeds and let them splutter. Then add the remaining cumin seeds, asafoetida, and curry leaves.
Cook the Spices: Add the ground masala paste to the cooker and saute for 2-3 minutes until it becomes fragrant and oil starts to separate.
Add Powdered Spices: Now, add the turmeric powder, coriander powder, red chilli powder, and salt. Stir well and cook for another minute.
Cook the Spiny Gourd: Add the soaked and drained spiny gourds to the masala. Mix well to coat them with the spices. Add the garam masala and the piece of tamarind.
Cook the Bhaji: Pour in about half a glass of water, or more if you prefer a thinner gravy. Stir everything together. Close the lid of the pressure cooker and cook for 3 whistles. If not using a pressure cooker, cover the pan and let it simmer on low heat until the spiny gourds are soft.
Serve: Once the pressure releases, open the cooker. Your delicious Kartule Gravy Bhaji is ready to be served hot!