def periphery(G, e=None):
 if (e is None):
  e = eccentricity(G)
 diameter = max(e.values())
 p = [v for v in e if (e[v] == diameter)]
 return p

def periphery ( G , e = None ) : if ( e is None ) : e = eccentricity ( G ) diameter = max ( e . values ( ) ) p = [ v for v in e if ( e [ v ] == diameter ) ] return p
return the periphery of the graph g .