Pressure-cook the split yellow peas until mashably soft. (If you don't have a pressure cooker, use a saucepan and enough water to cover the lentils by about 2 inches. The lentils should take about 45 minutes to become mashably soft. Check often and stir to ensure that the water hasn't evaporated or the lentils will burn. Add more water if needed).
Fry masala ingredients in a teaspoon of oil. When the dals turn golden, remove to a blender and grind into a smooth paste along with coconut.
Heat the remaining teaspoon of oil and add mustard seeds and curry leaves, if using.
Add the pattypan squash and stir-fry for about five minutes or until it starts to get tender.
Add the ground masala and the cooked split peas and stir well.
Add more water if the kootu is too thick and bring it to a boil. Lower the heat and simmer for about 10 minutes, until the flavors have blended together and the squash is very tender.
Add salt to taste.
Serve hot with rice and papads.