<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _find_particle_image(self, query, match, all_particles):
 """Find particle with the same index as match in a neighboring tile. """

        _, idxs = self.particle_kdtree.query(query.pos, k=10)

        neighbors = all_particles[idxs]

        for particle in neighbors:
            if particle.index == match.index:
                return particle
        raise MBuildError('Unable to find matching particle image while'
                          ' stitching bonds.')