Pressure cook the split yellow peas until it is soft and mashed. (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 soft and mashed. Check often and stir to ensure that the water hasn't evaporated or else the lentils will burn. Add more water if needed).
Fry masala ingredients in a tsp of oil. When the dals turn golden, remove to a blender and grind into a smooth paste along with coconut.
Heat the remaining tsp of oil and add mustard seeds and curry leaves, if you are using them.
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 flavours have blended together and the squash is very tender.