To make refried beans from dried pinto beans: Prepare the full Pinto Beans recipe. Transfer a little more than half of the cooked beans to a blender with about 2 to 4 tablespoons of water, enough for the beans to blend. Return the blended beans to the pot and stir in the avocado oil, lime juice, and chili powder, to taste. If the mixture is too thick, stir in more water to reach your desired consistency.
To make refried beans from canned pinto beans: Heat the oil in a medium saucepan over medium heat. Add the onion and cook for 5 to 8 minutes, until softened. Stir in the cumin and chili powder, then add the beans, oregano, salt, and pepper. Reduce the heat to low and simmer, stirring often, for 15 minutes. Transfer 3/4 of the cooked beans to a blender and blend until smooth. Return the blended beans to the pot, and stir in the lime juice. Season to taste and serve.
Serve the finished refried beans with cilantro, Cotija cheese and red pepper flakes, if desired.