Python Finding The Surrounding Rectangular Region Given A Line Inside

Python Finding The Surrounding Rectangular Region Given A Line Inside