I'd get a piece of cardboard to use as a template. Cut the cardboard so it's a tight fit in the cage and then get a piece of plastic or wood or whatever you want to use as a divider.
Use the cardboard template to get it to the size you need.
You could use screws to hold it in place in the vivs. Or get it tight enough so that you don't need anything to hold it into place. Or make a wooden divider and then get a couple pieces of wood that are long enough to to touch the divider and the other side of the vivs at the same time making it impossible for the snake to push the divider out
There are probably hundreds of ways to do it. Just need to look at what materials you have or can get and work around that .
Good luck