Add gram flour, milk, and ghee in a small mixing bowl and mix well. Allow for a 30-minute resting period.
After 30 minutes, sieve the mixture with a medium hole strainer to get a consistent texture.
Melt ghee in a pan over medium heat. Add the magas flour to the pan and roast at a low-medium temperature until the mixture smells nutty and has darkened slightly in color. Continue stirring to keep the mixture from sticking to the bottom of the pan and from burning.
Now turn the flame to the lowest and add 3-4 tablespoons of milk, one tablespoon at a time. The mixture will bubble up and become grainy. Keep stirring as you add the milk.
Turn off the flame. Continue stirring for 1-2 minutes more, as the pan is still hot and we don't want the flour to burn. Mix in the cardamom powder and give it a stir. After 8-10 minutes, add the powdered sugar.
We want the mixture to be warm, but not very hot as otherwise the sugar will melt and make the mixture too thin.
Transfer the mixture into the tray and spread it evenly. Use a flat spatula to make it smooth on the top. And tap the tray on the counter couple of times to get the mixture to spread evenly. Garnish with thinly sliced almonds and pistachios.
When the magas has cooled, cut into squares or diamond shapes using a sharp knife. Remove gently so that they do not break. Serve immediately or store in an air-tight container. Enjoy!