code: def test_ratsimp():
      f, g = 1 / x + 1 / y, (x + y) / (x * y)
  
      assert f != g and ratsimp(f) == g
  
      f, g = 1 / (1 + 1 / x), 1 - 1 / (x + 1)
  
      assert f != g and ratsimp(f) == g
  
      f, g = x / (x + y) + y / (x + y), 1
  
      assert f != g and ratsimp(f) == g
  
      f, g = -x - y - y**2 / (x + y) + x**2 / (x + y), -2 * y
  
      assert f != g and ratsimp(f) == g
  
      f = (
          a * c * x * y
          + a * c * z
          - b * d * x * y
          - b * d * z
          - b * t * x * y
          - b * t * x
          - b * t * z
          + e * x
      ) / (x * y + z)
      G = [
          a * c - b * d - b * t + (-b * t * x + e * x) / (x * y + z),
          a * c - b * d - b * t - (b * t * x - e * x) / (x * y + z),
      ]
  
      assert f != g and ratsimp(f) in G
  
      A = sqrt(pi)
  
      B = log(erf(x) - 1)
      C = log(erf(x) + 1)
  
      D = 8 - 8 * erf(x)
  
      f = (
          A * B / D
          - A * C / D
          + A * C * erf(x) / D
          - A * B * erf(x) / D
          + 2 * A / D
      )
  
      assert ratsimp(f) == A * B / 8 - A * C / 8 - A / (4 * erf(x) - 4)
  
file_path: sympy/sympy/simplify/tests/test_ratsimp.py
imports: from sympy.core.numbers import Rational, pi
  from sympy.functions.elementary.exponential import log
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.functions.special.error_functions import erf
  from sympy.polys.domains import GF
  from sympy.simplify.ratsimp import ratsimp, ratsimpmodprime
  from sympy.abc import x, y, z, t, a, b, c, d, e
label_desc: Use image node_id 1 for calling a global function with example usage: test_ratsimp() without return types