3 15 oz cans pinto beans (or 1 lb / 500 g dry pinto beans, prepared according to package directions)
2 medium yellow onions
about 1/4 cup extra virgin olive oil
1/4 tsp ground cinnamon
1/4 tsp ground cloves
pinch of saffron
2 cloves garlic (optional)
salt and pepper, to taste
Coarsely chop the onions and garlic. Heat the olive oil over medium heat in a large pot or dutch oven, and add the onions when the oil begins to shimmer. Stir and cook over medium heat until tender, about 10 minutes. Add the garlic and stir until fragrant, careful to not let it burn.
Pour in the undrained beans and stir well. Simmer gently for about 10 minutes.
Now comes the fun part! Using an immersion blender (very carefully so as to not splash hot liquid on yourself) or potato masher, puree the beans to as even a consistency as you can. The texture you are looking for is like a thick soup, so if you need it to thicken a bit, simmer uncovered for another 10 minutes or so. If they are too thick, add a little more liquid (either from the beans if you used dry beans or a bit of chicken broth or water if you used canned beans). Also bear in mind that the lobio will thicken somewhat as it cools.