def METHOD_NAME(self):
    inf = float("inf")
    G = self.square.copy()
    G.edges[1, 2]["weight"] = 2
    expected = {(u, v, 5 - wt) for u, v, wt in G.edges(data="weight", default=1)}
    assert set(nx.local_bridges(G, weight="weight")) == expected
    expected = {(u, v, 6) for u, v in G.edges}
    lb = nx.local_bridges(G, weight=lambda u, v, d: 2)
    assert set(lb) == expected