Set the Instant Pot to Sauté mode. When it is hot, add the cumin seeds and black mustard seeds. Toast the seeds for 30 seconds.
Add the onions, carrots, and celery, and cook the vegetables for about 5 minutes. Stir them often to keep them from sticking.
Mix in the garlic, chopped chili peppers (if using), and ginger. Stir the ingredients for 30 seconds.
Stir in the cardamom, turmeric, garam masala, and nutmeg. Quickly stir in the spices to cover the rest of the ingredients.
Add the sweet potatoes, apples, and tomatoes. Stir in each ingredient after adding them. Turn off the Instant Pot. Use a wooden spoon to clean the bottom of the Instant Pot gently.
After you cancel the Sauté function, mix in the lentils and vegetable broth. Stir the bottom again to remove any bits of veggies or spices.
Secure the lid on the Instant Pot and push the steam handle into the Sealing position. Set the Instant Pot to High pressure for 10 minutes. When the cooking is finished, allow the Instant Pot to naturally release for 10 minutes. Carefully open the steam handle. Let the steam release and when the float valve is in the down position, remove the lid.
Stir in 1 cup of coconut milk and 1 - 2 tablespoons of lemon juice. Taste the soup and then add salt and pepper if desired. Be sure to stir the soup every time you make a flavor adjustment. You can also add more lemon juice or coconut milk.
Garnish the soup with additional lemon wedges if desired. Appropriate garnishes include chopped cilantro, sliced chilies, diced red onions, or an additional plop of coconut milk. Mulligatawny soup can also be served curry style over rice.