code: def check_image_positions(self, kwargs_ps, kwargs_lens, tolerance=0.001):
          
          x_image_list, y_image_list = self.image_position(kwargs_ps, kwargs_lens)
          for i, model in enumerate(self._point_source_list):
              if model in ['LENSED_POSITION', 'SOURCE_POSITION']:
                  x_pos = x_image_list[i]
                  y_pos = y_image_list[i]
                  x_source, y_source = self._lensModel.ray_shooting(x_pos, y_pos, kwargs_lens)
                  dist = np.sqrt((x_source - x_source[0]) ** 2 + (y_source - y_source[0]) ** 2)
                  if np.max(dist) > tolerance:
                      return False
          return True
docs: checks whether the point sources in kwargs_ps satisfy the lens equation with a tolerance
          (computed by ray-tracing in the source plane)
  
          :param kwargs_ps:
          :param kwargs_lens:
          :param tolerance:
          :return: bool: True, if requirement on tolerance is fulfilled, False if not.