Peas, beans, and peanuts are all examples of legumes. Legumes are a specific type of plant which possess nodules on their roots, as shown below.
What is the purpose of these nodules?