class_docstr: For each semisimple Lie group, we have a Weyl group.  It is a subgroup of
  the isometry group of the root system.  Specifically, it's the subgroup
  that is generated by reflections through the hyperplanes orthogonal to
  the roots.  Therefore, Weyl groups are reflection groups, and so a Weyl
  group is a finite Coxeter group.
docstr: This is a helper method for determining the order of an element in the
  Weyl group of G2.  It takes a Weyl element and if repeated simple reflections
  in it, it deletes them.
docstr_tok: ["This","is","a","helper","method","for","determining","the","order","of","an","element","in","the","Weyl","group","of","G2",".","It","takes","a","Weyl","element","and","if","repeated","simple","reflections","in","it",",","it","deletes","them","."]
code: def delete_doubles(self, reflections):
      """
      This is a helper method for determining the order of an element in the
      Weyl group of G2.  It takes a Weyl element and if repeated simple reflections
      in it, it deletes them.
      """
      counter = 0
      copy = list(reflections)
      for elt in copy:
          if counter < len(copy) - 1:
              if copy[counter + 1] == elt:
                  del copy[counter]
                  del copy[counter]
          counter += 1
  
      return copy
  
file_path: sympy/sympy/liealgebras/weyl_group.py
imports: from .cartan_type import CartanType
  from mpmath import fac
  from sympy.core.backend import Matrix, eye, Rational, igcd
  from sympy.core.basic import Atom
label_desc: Use image node_id 6 for calling the WeylGroup obj's underlying member method code with example usage: obj.delete_doubles(reflections) and returns: copy