Heat 3 tbsps. of ghee in a pan. Add the ginger, garlic, onion, cinnamon bark, star anise and cardamom seeds. Cook, stirring often, until aromatic, about two minutes.
Add the rice. Stir to coat every grain with oil.
Add the yogurt. Stir. Pour in about two cups of water. Sprinkle with about a teaspoonful of salt.
Pour everything into the rice cooker. Tie the pandan leaves and lemongrass stalk together and throw it in. Turn on the rice cooker and let it do its work.
While the rice cooks, heat the remaining ghee and fry the nuts until lightly browned. Transfer to a plate and cool.
When the rice is done, add the raisins, fluff the rice with a fork. Discard the pandan leaves and lemongrass, as well as the star anise and cinnamon bark.
Ladle the rice into bowls. Top with nuts and sliced scallions.