class_docstr: Class to run the substitution algorithm from the list of maximal matches.
class_docstr_tok: ["Class","to","run","the","substitution","algorithm","from","the","list","of","maximal","matches","."]
docstr: Sort the substitution list.
code: def _substitution_sort(self):
      """Sort the substitution list."""
      ordered = False
      while not ordered:
          ordered = self._permutation()
  
imports: import copy
  import itertools
  from collections import OrderedDict
  from typing import Sequence, Callable
  import numpy
  import pennylane
  from pennylane.transforms import transform
  from pennylane import adjoint
  from pennylane.ops.qubit.attributes import symmetric_over_all_wires
  from pennylane.tape import QuantumTape, QuantumScript
  from pennylane.transforms.commutation_dag import commutation_dag
  from pennylane.wires import Wires
label_desc: Use image node_id 6 for calling the TemplateSubstitution obj's underlying member method code with example usage: obj._substitution_sort() without return types