I personally feel this ^^^^^ is a better guideline for MY snakes.
While What Yoda said is doable.
For example I put my 7.5-8 Foot Coastal Python, Lizzy in a 4x2x2. It works ok, especially being a taller cage for a semi-arboreal snake. However after the few days in her new enclosure, it's easy to see that a 6x2x2 will be much better. I plan to move her up.
Lizzy, Coastal Python in 4x2x2
This decision to move for Lizzy was reinforced when I got a 6x2x18inch high enclosure for Punch, my 7 foot Boa. It is a nice sized enclosure with breathing room.
Punch, Common BI
I know that these snakes are not giants, I'm just trying to contribute to these two caging guidelines mentioned.