code: def plot_probabilities_histogram(Y_p, title=None):
      
      if Y_p.ndim > 1:
          msg = (
              f"Arg Y_p should be a 1-dimensional np.ndarray, not of shape "
              f"{Y_p.shape}."
          )
          raise ValueError(msg)
      plt.hist(Y_p, bins=20)
      plt.xlim((0, 1.025))
      plt.xlabel("Probability")
      plt.ylabel("# Predictions")
      if isinstance(title, str):
          plt.title(title)
      plt.show()
docs: Plot a histogram from a numpy array of probabilities
  
      Args:
          Y_p: An [n] or [n, 1] np.ndarray of probabilities (floats in [0,1])