If using dried beans, soak them overnight in plenty of cold water, then drain.
Put the beans in a large pan and add cold water to cover by about 3cm.
Put on the lid, bring to a boil, then turn down the heat and simmer gently until soft – this should take at least an hour.
Alternatively, drain the tinned beans into a large pan with about half of their liquid, then heat up gently.
Once the beans are almost ready, toast the cumin seeds in a dry frying pan until aromatic, then pound with garlic and a pinch of coarse salt to a paste.
Put the oil in the same frying pan on medium heat, then fry the onion until softened.
Add the tomato and chilli, if using, and fry for another five minutes until the tomato has broken down.
If there’s still a lot of liquid left in the beans, uncover the pan, turn up the heat and reduce until the mix begins to take on a saucy consistency.
Mash about a quarter of the beans to help thicken the sauce, then stir in the onions, tomatoes and garlic paste, and cook gently for about 10 minutes, adding more liquid if the mix looks too dry.
Add a squeeze of lemon juice and season to taste.
Serve sprinkled with chopped flat-leaf parsley and more extra-virgin olive oil, with warm flatbreads, lemon wedges, salad, pickles, and so on on the side as desired.
