class_docstr: Unit tests for the
  :func:`~networkx.algorithms.matching.maximal_matching`.
docstr: Tests that a maximal matching is computed correctly
  regardless of the order in which nodes are added to the graph.
docstr_tok: ["Tests","that","a","maximal","matching","is","computed","correctly","regardless","of","the","order","in","which","nodes","are","added","to","the","graph","."]
code: def test_ordering(self):
      """Tests that a maximal matching is computed correctly
      regardless of the order in which nodes are added to the graph.
  
      """
      for nodes in permutations(range(3)):
          G = nx.Graph()
          G.add_nodes_from(nodes)
          G.add_edges_from([(0, 1), (0, 2)])
          matching = nx.maximal_matching(G)
          assert len(matching) == 1
          assert nx.is_maximal_matching(G, matching)
  
imports: import math
  from itertools import permutations
  from pytest import raises
  import networkx
  from networkx.algorithms.matching import matching_dict_to_set
  from networkx.utils import edges_equal
label_desc: Use image node_id 4 for calling the TestMaximalMatching obj's underlying member method code with example usage: obj.test_ordering() without return types