def summarize_otu_sizes_from_otu_map(otu_map_f):
 result = {}
 for (otu_id, seq_ids) in fields_to_dict(otu_map_f).items():
  otu_size = len(seq_ids)
  try:
   result[otu_size] += 1
  except KeyError:
   result[otu_size] = 1
 result = sorted(result.items())
 return result

def summarize_otu_sizes_from_otu_map ( otu_map_f ) : result = { } for ( otu_id , seq_ids ) in fields_to_dict ( otu_map_f ) . items ( ) : otu_size = len ( seq_ids ) try : result [ otu_size ] += 1 except KeyError : result [ otu_size ] = 1 result = sorted ( result . items ( ) ) return result
given an otu map file handle .