code: def find_closest_neighbours(cell, all_cells, k, max_dist):
          
          all_cells = [c for c in all_cells if c != cell]
  
          sorted_cells = sorted([(cell.distance(c), c) for c in all_cells])
  
          return [sc[1] for sc in sorted_cells[:k] if sc[0] <= max_dist]
docs: Find k closest neighbours of the given cell.
          :param CellFeatures cell: cell of interest
          :param all_cells: cell to consider as neighbours
          :param int k: number of neighbours to be returned
          :param int max_dist: maximal distance in pixels to consider neighbours
          :return: k closest neighbours