class_docstr: Unit tests for computing a minimum (or maximum) spanning tree
  using Prim's algorithm.
class_docstr_tok: ["Unit","tests","for","computing","a","minimum","(","or","maximum",")","spanning","tree","using","Prim","'s","algorithm","."]
code: def test_multigraph_keys_tree(self):
      G = nx.MultiGraph()
      G.add_edge(0, 1, key="a", weight=2)
      G.add_edge(0, 1, key="b", weight=1)
      T = nx.minimum_spanning_tree(G, algorithm=self.algo)
      assert edges_equal([(0, 1, 1)], list(T.edges(data="weight")))
  
imports: import pytest
  import networkx
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 3 for calling the TestPrim obj's underlying member method code with example usage: obj.test_multigraph_keys_tree() without return types