code: def test_simulated_annealing_undirected(self):
      cycle = self.tsp(self.UG, "greedy", source="D", seed=42)
      cost = sum(
          self.UG[n][nbr]["weight"] for n, nbr in pairwise(cycle)
      )
      validate_solution(cycle, cost, self.UG_cycle, self.UG_cost)
  
      cycle = self.tsp(self.UG2, "greedy", source="D", seed=42)
      cost = sum(
          self.UG2[n][nbr]["weight"] for n, nbr in pairwise(cycle)
      )
      validate_symmetric_solution(
          cycle, cost, self.UG2_cycle, self.UG2_cost
      )
  
      cycle = self.tsp(
          self.UG2, "greedy", move="1-0", source="D", seed=42
      )
      cost = sum(
          self.UG2[n][nbr]["weight"] for n, nbr in pairwise(cycle)
      )
      validate_symmetric_solution(
          cycle, cost, self.UG2_cycle, self.UG2_cost
      )
  
imports: import random
  import pytest
  import networkx
  import networkx.algorithms.approximation
label_desc: Use image node_id 2 for calling the TestSimulatedAnnealingTSP obj's underlying member method code with example usage: obj.test_simulated_annealing_undirected() without return types