First sort through the beans and remove any stones. Rinse them well and cover with cold water. Soak the beans for up to 8 hours (or overnight).
If you have forgotten to soak the beans in advance, bring them to a boil over high heat for about 3 minutes. Drain, rinse with cold water and continue with the recipe.
To cook the beans, first drain the soaking liquid. Rinse and place into a medium-sized pot. Mince the garlic and onion. Add these to the pot, along with the epazote. Cover with cold water and bring to a boil. Reduce the heat and let simmer for about an hour, or until the beans are almost cooked through.
Once the beans are almost done, add the salt. When tender, drain and reserve about one cup of the cooking liquid.
Place the beans into a food processor. Add the reserved liquid, a few tablespoons at a time. Add just enough liquid to help blend the beans. They should still be a bit chunky.
To fry the beans, heat a small, non-stick fry pan over medium heat. Add the oil. Once the oil is hot, add the beans and stir to heat through. You can break up the beans even more with a potato masher, if you like. Let the beans fry for a few minutes until the excess moisture evaporates.
Set aside and keep warm while you prepare the rest of your mise en place.