def get_min_max_weight_edges(G):
  """ Return the minimum and maximum weight in the graph G.

  """
  min_weight = 1e10
  max_weight = 0
  for edge in G.edges(data=True):
    min_weight = min(1.0/edge[2]["weight"], min_weight)
    max_weight = max(1.0/edge[2]["weight"], max_weight)
  return min_weight, max_weight