def select_edges(edges, label)
      label.nil? ? edges : edges.select { |edge| edge.label == label }
    end
def select_edges(edges, label)
      label.nil? ? edges : edges.select { |edge| edge.label == label }
    end
Internal: Given an array of edges, and an optional label label, selects
 the edges from the given set.

 edges - The array of edges to be filtered.
 label - The label of the edges to be emitted.

 Returns an array of edges.