code: def test_low_index_subgroups():
      F, x, y = free_group("x, y")
  
      # Example 5.10 from [1] Pg. 194
      f = FpGroup(F, [x**2, y**3, (x * y) ** 4])
      L = low_index_subgroups(f, 4)
      t1 = [
          [[0, 0, 0, 0]],
          [[0, 0, 1, 2], [1, 1, 2, 0], [3, 3, 0, 1], [2, 2, 3, 3]],
          [[0, 0, 1, 2], [2, 2, 2, 0], [1, 1, 0, 1]],
          [[1, 1, 0, 0], [0, 0, 1, 1]],
      ]
      for i in range(len(t1)):
          assert L[i].table == t1[i]
  
      f = FpGroup(F, [x**2, y**3, (x * y) ** 7])
      L = low_index_subgroups(f, 15)
      t2 = [
          [[0, 0, 0, 0]],
          [
              [0, 0, 1, 2],
              [1, 1, 2, 0],
              [3, 3, 0, 1],
              [2, 2, 4, 5],
              [4, 4, 5, 3],
              [6, 6, 3, 4],
              [5, 5, 6, 6],
          ],
          [
              [0, 0, 1, 2],
              [1, 1, 2, 0],
              [3, 3, 0, 1],
              [2, 2, 4, 5],
              [6, 6, 5, 3],
              [5, 5, 3, 4],
              [4, 4, 6, 6],
          ],
          [
              [0, 0, 1, 2],
              [1, 1, 2, 0],
              [3, 3, 0, 1],
              [2, 2, 4, 5],
              [6, 6, 5, 3],
              [7, 7, 3, 4],
              [4, 4, 8, 9],
              [5, 5, 10, 11],
              [11, 11, 9, 6],
              [9, 9, 6, 8],
              [12, 12, 11, 7],
              [8, 8, 7, 10],
              [10, 10, 13, 14],
              [14, 14, 14, 12],
              [13, 13, 12, 13],
          ],
          [
              [0, 0, 1, 2],
              [1, 1, 2, 0],
              [3, 3, 0, 1],
              [2, 2, 4, 5],
              [6, 6, 5, 3],
              [7, 7, 3, 4],
              [4, 4, 8, 9],
              [5, 5, 10, 11],
              [11, 11, 9, 6],
              [12, 12, 6, 8],
              [10, 10, 11, 7],
              [8, 8, 7, 10],
              [9, 9, 13, 14],
              [14, 14, 14, 12],
              [13, 13, 12, 13],
          ],
          [
              [0, 0, 1, 2],
              [1, 1, 2, 0],
              [3, 3, 0, 1],
              [2, 2, 4, 5],
              [6, 6, 5, 3],
              [7, 7, 3, 4],
              [4, 4, 8, 9],
              [5, 5, 10, 11],
              [11, 11, 9, 6],
              [12, 12, 6, 8],
              [13, 13, 11, 7],
              [8, 8, 7, 10],
              [9, 9, 12, 12],
              [10, 10, 13, 13],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 3, 3],
              [2, 2, 5, 6],
              [7, 7, 6, 4],
              [8, 8, 4, 5],
              [5, 5, 8, 9],
              [6, 6, 9, 7],
              [10, 10, 7, 8],
              [9, 9, 11, 12],
              [11, 11, 12, 10],
              [13, 13, 10, 11],
              [12, 12, 13, 13],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 3, 3],
              [2, 2, 5, 6],
              [7, 7, 6, 4],
              [8, 8, 4, 5],
              [5, 5, 8, 9],
              [6, 6, 9, 7],
              [10, 10, 7, 8],
              [9, 9, 11, 12],
              [13, 13, 12, 10],
              [12, 12, 10, 11],
              [11, 11, 13, 13],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 5, 6],
              [2, 2, 4, 4],
              [7, 7, 6, 3],
              [8, 8, 3, 5],
              [5, 5, 8, 9],
              [6, 6, 9, 7],
              [10, 10, 7, 8],
              [9, 9, 11, 12],
              [13, 13, 12, 10],
              [12, 12, 10, 11],
              [11, 11, 13, 13],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 5, 6],
              [2, 2, 7, 8],
              [5, 5, 6, 3],
              [9, 9, 3, 5],
              [10, 10, 8, 4],
              [8, 8, 4, 7],
              [6, 6, 10, 11],
              [7, 7, 11, 9],
              [12, 12, 9, 10],
              [11, 11, 13, 14],
              [14, 14, 14, 12],
              [13, 13, 12, 13],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 5, 6],
              [2, 2, 7, 8],
              [6, 6, 6, 3],
              [5, 5, 3, 5],
              [8, 8, 8, 4],
              [7, 7, 4, 7],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 5, 6],
              [2, 2, 7, 8],
              [9, 9, 6, 3],
              [6, 6, 3, 5],
              [10, 10, 8, 4],
              [11, 11, 4, 7],
              [5, 5, 10, 12],
              [7, 7, 12, 9],
              [8, 8, 11, 11],
              [13, 13, 9, 10],
              [12, 12, 13, 13],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 5, 6],
              [2, 2, 7, 8],
              [9, 9, 6, 3],
              [6, 6, 3, 5],
              [10, 10, 8, 4],
              [11, 11, 4, 7],
              [5, 5, 12, 11],
              [7, 7, 10, 10],
              [8, 8, 9, 12],
              [13, 13, 11, 9],
              [12, 12, 13, 13],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 5, 6],
              [2, 2, 7, 8],
              [9, 9, 6, 3],
              [10, 10, 3, 5],
              [7, 7, 8, 4],
              [11, 11, 4, 7],
              [5, 5, 9, 9],
              [6, 6, 11, 12],
              [8, 8, 12, 10],
              [13, 13, 10, 11],
              [12, 12, 13, 13],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 5, 6],
              [2, 2, 7, 8],
              [9, 9, 6, 3],
              [10, 10, 3, 5],
              [7, 7, 8, 4],
              [11, 11, 4, 7],
              [5, 5, 12, 11],
              [6, 6, 10, 10],
              [8, 8, 9, 12],
              [13, 13, 11, 9],
              [12, 12, 13, 13],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 5, 6],
              [2, 2, 7, 8],
              [9, 9, 6, 3],
              [10, 10, 3, 5],
              [11, 11, 8, 4],
              [12, 12, 4, 7],
              [5, 5, 9, 9],
              [6, 6, 12, 13],
              [7, 7, 11, 11],
              [8, 8, 13, 10],
              [13, 13, 10, 12],
          ],
          [
              [1, 1, 0, 0],
              [0, 0, 2, 3],
              [4, 4, 3, 1],
              [5, 5, 1, 2],
              [2, 2, 4, 4],
              [3, 3, 6, 7],
              [7, 7, 7, 5],
              [6, 6, 5, 6],
          ],
      ]
      for i in range(len(t2)):
          assert L[i].table == t2[i]
  
      f = FpGroup(F, [x**2, y**3, (x * y) ** 7])
      L = low_index_subgroups(f, 10, [x])
      t3 = [
          [[0, 0, 0, 0]],
          [
              [0, 0, 1, 2],
              [1, 1, 2, 0],
              [3, 3, 0, 1],
              [2, 2, 4, 5],
              [4, 4, 5, 3],
              [6, 6, 3, 4],
              [5, 5, 6, 6],
          ],
          [
              [0, 0, 1, 2],
              [1, 1, 2, 0],
              [3, 3, 0, 1],
              [2, 2, 4, 5],
              [6, 6, 5, 3],
              [5, 5, 3, 4],
              [4, 4, 6, 6],
          ],
          [
              [0, 0, 1, 2],
              [3, 3, 2, 0],
              [4, 4, 0, 1],
              [1, 1, 5, 6],
              [2, 2, 7, 8],
              [6, 6, 6, 3],
              [5, 5, 3, 5],
              [8, 8, 8, 4],
              [7, 7, 4, 7],
          ],
      ]
      for i in range(len(t3)):
          assert L[i].table == t3[i]
  
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 1 for calling a global function with example usage: test_low_index_subgroups() without return types