def METHOD_NAME(p: ImzMLParser, n_samples=200):
    sp_n = len(p.coordinates)
    sp_idxs = np.sort(np.random.choice(sp_n, min(n_samples, sp_n), False))
    return get_spectra_df_from_parser(p, sp_idxs)