code: def test_astar_undirected(self):
      GG = self.XG.to_undirected()
      # make sure we get lower weight
      # to_undirected might choose either edge with weight 2 or weight 3
      GG["u"]["x"]["weight"] = 2
      GG["y"]["v"]["weight"] = 2
      assert nx.astar_path(GG, "s", "v") == ["s", "x", "u", "v"]
      assert nx.astar_path_length(GG, "s", "v") == 8
  
imports: import pytest
  import networkx
  from networkx.utils import pairwise
label_desc: Use image node_id 6 for calling the TestAStar obj's underlying member method code with example usage: obj.test_astar_undirected() without return types