Creates a Von Neumann query on the specified grid using the specified objectas the source where the neighborhood is specified by the extent. Theextent defines the dimensions of the neighborhood in the x, y, andoptionaly z dimensions. If the extent args are missing, they default toone.This object can be reused by resetting the source and extents using the reset method. The queries will return an empty iterable if thesource object does not have a grid location.Parameters:grid source extent