Soak the beans overnight, or do a quick soak. After soaking, rinse well and drain.
Set a multifunction pressure cooker (such as an Instant Pot) to sauté.
Put the onion, vinegar, dried herbs and spices, and pepper in the pot and cook for 5–7 minutes, stirring frequently, until the onion starts to soften. If the mixture is sticking, add a splash of water.
Turn off the sauté function and add the soaked beans, water, tomato paste, tamari, molasses, sea salt, bay leaves, and apple (if using). Stir to mix well.
Secure the lid and set the valve to the “sealed” position. Press the Manual button and set the cook
time for 15 minutes at high pressure. Allow the pot to come to pressure and cook.
Once the timer goes off, turn off the pot and allow the pressure to naturally release. Open the pot and allow the beans to cool slightly. (Note: The sauce will still be thin at this point.)
Taste and adjust the seasonings, adding the maple syrup and more salt and/or pepper if desired. Then, put the lid back on and let the beans sit in the residual heat for a couple of hours if possible. The more the beans sit, the more they absorb the liquid—and thereby the flavors! Shortly before you’re ready to eat, set the pot to “keep warm” until the beans are nice and hot.