def suitable_estimator(levels, errorbars_cdf = [16,84]):
  """
  Returns maximum-posterior value (posterior mode position) if it is within
  credible levels, otherwise returns 50%-CDF value.
  The function complements estimate_from_distribution().
  """
  if levels['maximum'] < levels[str(errorbars_cdf[1])] and \
     levels['maximum'] > levels[str(errorbars_cdf[0])]:
    return levels['maximum'], 'maximum'
  else:
    return levels['50'], '50'