code: def test_FracField_index():
      a = symbols("a")
      F, x, y, z = field("x y z", QQ)
      assert F.index(x) == 0
      assert F.index(y) == 1
  
      raises(ValueError, lambda: F.index(1))
      raises(ValueError, lambda: F.index(a))
      pass
  
imports: from sympy.polys.fields import field, sfield, FracField, FracElement
  from sympy.polys.rings import ring
  from sympy.polys.domains import ZZ, QQ
  from sympy.polys.orderings import lex
  from sympy.testing.pytest import raises, XFAIL
  from sympy.core import symbols, E
  from sympy.core.numbers import Rational
  from sympy.functions.elementary.exponential import exp, log
  from sympy.functions.elementary.miscellaneous import sqrt
label_desc: Use image node_id 22 for calling a global function with example usage: test_FracField_index() without return types