get_periphery function

Get nodes that form the graph periphery