In a large saucepan, combine the chickpeas or lentils, shallots, saffron, turmeric, ginger, tomatoes, tomato paste, stock or water, olive oil, half of the cilantro, and half of the parsley. Bring to a boil over high heat, and then reduce heat to maintain a simmer, cover, and cook for 15 minutes.
Remove ½ cup of the liquid and pour into a small bowl.
Add the flour and stir until there are no lumps.
Add more liquid if it looks too much like a paste.
Whisk this mixture back into the large saucepan. Also, add the lemon and a pinch of salt and pepper.
Let the soup cook for five minutes.
Taste and add more salt and pepper if needed. Ladle the soup into bowls and garnish with the remaining cilantro and parsley.