<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot_val_with_title(self, idxs, y):
 """ Displays the images and their probabilities of belonging to a certain class Arguments: idxs (numpy.ndarray):
 indexes of the image samples from the dataset y (int):
 the selected class Returns: Plots the images in n rows [rows = n] """

        # if there are any samples to be displayed
        if len(idxs) > 0:
            imgs = np.stack([self.ds[x][0] for x in idxs])
            title_probs = [self.probs[x,y] for x in idxs]

            return plots(self.ds.denorm(imgs), rows=1, titles=title_probs)
        # if idxs is empty return false
        else:
            return False;