def lhn1(graph):
A = gts.adjacency(graph)
paths = A**2
paths = paths.toarray()
S = np.zeros(A.shape)
degrees = get_degrees_dic(graph)
for i in xrange(S.shape[0]):
for j in xrange(S.shape[0]):
i_degree = degrees[i] #graph.vertex(i).out_degree()
j_degree = degrees[j] #graph.vertex(j).out_degree()
factor = i_degree * j_degree
S[i,j] = (1.0/factor) * paths[i,j]
return S