Walmart agreed to pay $3.1 billion to settle opioid lawsuits.