docstr: Tests that an approximate dominating set for the star graph,
  even when the center node does not have the smallest integer
  label, gives just the center node.
  
  For more information, see #1527.
docstr_tok: ["Tests","that","an","approximate","dominating","set","for","the","star","graph",",","even","when","the","center","node","does","not","have","the","smallest","integer","label",",","gives","just","the","center","node",".","For","more","information",",","see","#","1527","."]
code: def test_star_graph(self):
      """Tests that an approximate dominating set for the star graph,
      even when the center node does not have the smallest integer
      label, gives just the center node.
  
      For more information, see #1527.
  
      """
      # Create a star graph in which the center node has the highest
      # label instead of the lowest.
      G = nx.star_graph(10)
      G = nx.relabel_nodes(G, {0: 9, 9: 0})
      assert min_weighted_dominating_set(G) == {9}
  
file_path: networkx/networkx/algorithms/approximation/tests/test_dominating_set.py
imports: import pytest
  import networkx
  from networkx.algorithms.approximation import min_edge_dominating_set, min_weighted_dominating_set
label_desc: Use image node_id 2 for calling the TestMinWeightDominatingSet obj's underlying member method code with example usage: obj.test_star_graph() without return types