Moved this (verbatim copy) to `surface.py` because it makes more sense for it to be there IMO.