Let the dried black beans stand one night with water enough for to cover all, next day cook with the same water add more if needed, adding epazote leaves, onion and salt. when the beans are cooking you only can add boiling water if need to add more. The beans will be done when are soft.
The beans are ready for fry, in some vegetable oil fry the other onion chopped, when it is transparent add the beans as you wish, mashed all or mashed some, do not add much broth, you can use it (the broth) for to make a soup with it, then cook for a 20 or 30 min or more.