code: def round_plateau_lengths(plateau_lengths: list):
      
      # round to n_digits of most common value
      digit_counts = [len(str(p)) for p in plateau_lengths]
      n_digits = min(3, int(np.percentile(digit_counts, 50)))
      f = 10 ** (n_digits - 1)
  
      for i, plateau_len in enumerate(plateau_lengths):
          plateau_lengths[i] = int(round(plateau_len / f)) * f
docs: Round plateau lengths to next divisible number of digit count e.g. 99 -> 100, 293 -> 300
  
      :param plateau_lengths:
      :return: