I have been looking for a Pythonic implementation that returns a 4 and 8-connected path where True is the 4 or 8 adjacency and False is not, given
True
False