Pick over dried beans carefully and remove any pebbles or debris.
Place in a large strainer or colander; rinse thoroughly under cold tap water.
Put the beans, onion, epazote, and whole chile in a large pot.
Add water to cover by 2 inches.
Bring to a boil, then reduce the heat to low, partially cover and simmer until the beans are very tender, about 1½ to 2 hours depending on the age of the beans.
If water reduces to the level of the beans before they are tender, add more water and cook until the beans are tender.
Remove the epazote and whole chile.
Add the lard or oil and the salt.
Purée the beans in a blender or food processor until thick but not too smooth.
There should be some texture.
Reheat shortly before serving.
If beans thicken too much as they stand, add hot broth or water to achieve the desired consistency.
To store, cover and refrigerate up to 3 days or freeze up to 3 months.