Re: li-ion
I briefly worked a contract job rejigging the network in an EV battery plant. Starting with individual electrodes the entire packs were built up on site. The individual modules were loaded into huge conditioning chargers, rows and rows of them like the aisles in a supermarket but 20 feet high, and along each row there were dozens of nitrogen cylinders ready to dump their loads - there must have been hundreds or thousands of those cylinders in the plant. We were told that if an alarm went off, sprint for the exit or you'll asphyxiate.
Given that, as others have pointed out, lithium fires make their own oxygen, I can only assume they were there to stop any fires in the electrical systems from setting off the batteries? Or maybe just for show. With that and the emergency showers everywhere in case of an electrolyte spill (get naked and get in there in a hurry or the acid will eat into your bones and kill you) it was a jolly fun old place.