Start the instant pot on SAUTE mode for 5 minutes.
Once the pot is hot enough add olive oil.
To this add bay leaf, and chopped garlic. Saute for 10 -15 seconds.
Then add chopped onions and saute for 1 - 2 minutes till the onion becomes translucent.
Then add the beans to the pot.
Give a stir to deglaze the pot.
Add water to the pot followed by salt and black pepper.
Cancel the Saute mode if there is still time left.
Close the lid and turn the venting knob to seal.
Start on manual pressure cook mode on high pressure.
If the beans are soaked prior, set the time for 17 minutes. And if the beans are non-soaked, the time will be 35 minutes. The instant pot will take around 3 - 4 minutes to come to pressure.
Once the timer beeps, let it be on NPR mode for 15 minutes and then release rest by turning the knob to venting.
Open the lid carefully.
Strain out the beans from the liquid. Don't throw the liquid as you can use that as stock for cooking.
Use the pinto beans as required or store them properly in refregerator or freezer.
Notes
Sauteing with onion and garlic adds to flavor only. However, you can just add everything to the pot and cook directly on pressure cook mode without sauteing.