Soak pinto beans for at least 3 hours prior.
Press the saute button on the Instant Pot. Add oil and garlic. Saute for 2 minutes.
With the saute function still on, add squash. Stir well.
Add tomatoes and bay leaves. Stir well.
Add cumin, garlic, oregano and chili powder. Stir well.
Turn the saute function off. Add soaked beans and broth or water.
Stir, and put the lid on. Make sure vent is sealed.
Cook on manual high pressure for 30 minutes.
Quick release pressure after 5 minutes.
Stir in sugar and vinegar. Salt to taste.
Enjoy!