def hdn_counts(sequence, graph):
 hdns = {}
 for kmer in kmers(sequence):
  d = graph.kmer_degree(kmer)
  if (d > 2):
   hdns[d] = (hdns.get(d, 0) + 1)
 return hdns

def hdn_counts ( sequence , graph ) : hdns = { } for kmer in kmers ( sequence ) : d = graph . kmer_degree ( kmer ) if ( d > 2 ) : hdns [ d ] = ( hdns . get ( d , 0 ) + 1 ) return hdns
get the degree distribution of nodes with degree more than 2 .