#NEWLINE# def _is_3star( adj_mat ) : #NEWLINE# #INDENT# 'Check if a given graphlet of size 4 is a 3-star' #NEWLINE# return ( ( adj_mat . sum ( ) == 10 ) and ( 4 in [ a . sum ( ) for a in adj_mat ] ) )