def _add_edge_filter(values, graph):
 values = values.astype(int)
 center = values[(len(values) // 2)]
 for value in values:
  if ((value != center) and (not graph.has_edge(center, value))):
   graph.add_edge(center, value)
 return 0.0

def _add_edge_filter ( values , graph ) : values = values . astype ( int ) center = values [ ( len ( values ) // 2 ) ] for value in values : if ( ( value != center ) and ( not graph . has_edge ( center , value ) ) ) : graph . add_edge ( center , value ) return 0.0
create edge in graph between central element of values and the rest .