def METHOD_NAME(obs,out=None, n_bins=12):
  if out==None:
    import sys
    out = sys.stdout
  from libtbx.str_utils import format_value
  if n_bins is not None: # if None, assume binner already set up
    obs.setup_binner(n_bins = n_bins)
  result = []
  counts_given = obs.binner().counts_given()
  counts_complete = obs.binner().counts_complete()
  for i_bin in obs.binner().range_used():
    sel_w = obs.binner().selection(i_bin)
    sel_fo_all = obs.select(sel_w)
    d_max_,d_min_ = sel_fo_all.d_max_min()
    d_range = obs.binner().bin_legend(
      i_bin=i_bin, show_bin_number=False, show_counts=True)
    sel_data = obs.select(sel_w).data()
    sel_sig = obs.select(sel_w).sigmas()
    if(sel_data.size() > 0):
      bin = resolution_bin(
        i_bin        = i_bin,
        d_range      = d_range,
        mean_I       = flex.mean(sel_data),
        n_work       = sel_data.size(),
        mean_I_sigI  = flex.mean(sel_data/sel_sig),
        d_max_min    = (d_max_, d_min_),
        completeness = (counts_given[i_bin], counts_complete[i_bin]))
      result.append(bin)
  print("\n Bin  Resolution Range  Compl.         <I>     <I/sig(I)>", file=out)
  for bin in result:
    fmt = " %s %s    %s  %s"
    print(fmt%(
      format_value("%3d",   bin.i_bin),
      format_value("%-17s", bin.d_range),
      format_value("%8.1f", bin.mean_I),
      format_value("%8.1f", bin.mean_I_sigI),
      ), file=out)
  return result