Place the beef, onions and water in a large pot and bring to a gentle boil.
Simmer on low heat, covered, for 1 hour.
Add the herbs, 1 teaspoon of salt, the pepper and turmeric, and continue to simmer for another 15 minutes.
At this point, there should not be a substantial amount of liquid left in the pot.
Using a colander, strain the mixture and press lightly to extract as much moisture as you can so that the meat mixture is not too wet. Set aside.
Place the walnuts in the food processor and pulse until you have a fine ground. Remove and place in a medium-sized mixing bowl.
Place the meat and herbs mixture in batches in the food processor and pulse until you have a roughly ground meat texture. Take extra care to not over process while also making sure there are no pieces of herbs or chunks of beef visible.
Remove and add to the ground walnuts in the mixing bowl.
Add the remaining 1/2 teaspoon of salt and the eggs, and mix well with your hands.
Begin forming the meat patties by removing roughly 3-4 tablespoons of the mixture and rolling them into a ball. Using the palm of your hand, press the ball down to form a patty that is no thicker than 1/2 inch.
Using your finger, push a hole through the center of the patty to create a patty that resembles a bagel. Continue until all the patties have been properly formed.
Heat a large frying pan over medium-high heat and add enough oil to fry the patties about 4 minutes on each side.
Remove from the pan and place on paper towels to remove any excess oil. Repeat until all the patties have been fried.
Shami is served with Persian steamed rice or flatbreads, along with a platter of fresh herbs and a side of yogurt.