code: def test_order():
      F, x, y = free_group("x, y")
      f = FpGroup(F, [x**4, y**2, x * y * x**-1 * y])
      assert f.order() == 8
  
      f = FpGroup(F, [x * y * x**-1 * y**-1, y**2])
      assert f.order() is S.Infinity
  
      F, a, b, c = free_group("a, b, c")
      f = FpGroup(
          F,
          [
              a**250,
              b**2,
              c * b * c**-1 * b,
              c**4,
              c**-1 * a**-1 * c * a,
              a**-1 * b**-1 * a * b,
          ],
      )
      assert f.order() == 2000
  
      F, x = free_group("x")
      f = FpGroup(F, [])
      assert f.order() is S.Infinity
  
      f = FpGroup(free_group("")[0], [])
      assert f.order() == 1
  
file_path: sympy/sympy/combinatorics/tests/test_fp_groups.py
imports: from sympy.core.singleton import S
  from sympy.combinatorics.fp_groups import FpGroup, low_index_subgroups, reidemeister_presentation, FpSubgroup, simplify_presentation
  from sympy.combinatorics.free_groups import free_group, FreeGroup
  from sympy.testing.pytest import slow
label_desc: Use image node_id 3 for calling a global function with example usage: test_order() without return types