code: def reduce_rational_inequalities(exprs, gen, relational=True):
      """Reduce a system of rational inequalities with rational coefficients.
  
      Examples
      ========
  
      >>> from sympy import Symbol
      >>> from sympy.solvers.inequalities import reduce_rational_inequalities
  
      >>> x = Symbol('x', real=True)
  
      >>> reduce_rational_inequalities([[x**2 <= 0]], x)
      Eq(x, 0)
  
      >>> reduce_rational_inequalities([[x + 2 > 0]], x)
      -2 < x
      >>> reduce_rational_inequalities([[(x + 2, ">")]], x)
      -2 < x
      >>> reduce_rational_inequalities([[x + 2]], x)
      Eq(x, -2)
  
      This function find the non-infinite solution set so if the unknown symbol
      is declared as extended real rather than real then the result may include
      finiteness conditions:
  
      >>> y = Symbol('y', extended_real=True)
      >>> reduce_rational_inequalities([[y + 2 > 0]], y)
      (-2 < y) & (y < oo)
      """
      exact = True
      eqs = []
      solution = S.EmptySet  # add pieces for each group
      for _exprs in exprs:
          if not _exprs:
              continue
          _eqs = []
          _sol = S.Reals
          for expr in _exprs:
              if isinstance(expr, tuple):
                  expr, rel = expr
              else:
                  if expr.is_Relational:
                      expr, rel = expr.lhs - expr.rhs, expr.rel_op
                  else:
                      expr, rel = expr, "=="
  
              if expr is S.true:
                  numer, denom, rel = S.Zero, S.One, "=="
              elif expr is S.false:
                  numer, denom, rel = S.One, S.One, "=="
              else:
                  numer, denom = expr.together().as_numer_denom()
  
              try:
                  (numer, denom), opt = parallel_poly_from_expr(
                      (numer, denom), gen
                  )
              except PolynomialError:
                  raise PolynomialError(
                      filldedent(
                          """
                      only polynomials and rational functions are
                      supported in this context.
                      """
                      )
                  )
  
              if not opt.domain.is_Exact:
                  numer, denom, exact = (
                      numer.to_exact(),
                      denom.to_exact(),
                      False,
                  )
  
              domain = opt.domain.get_exact()
  
              if not (domain.is_ZZ or domain.is_QQ):
                  expr = numer / denom
                  expr = Relational(expr, 0, rel)
                  _sol &= solve_univariate_inequality(
                      expr, gen, relational=False
                  )
              else:
                  _eqs.append(((numer, denom), rel))
  
          if _eqs:
              _sol &= solve_rational_inequalities([_eqs])
              exclude = solve_rational_inequalities(
                  [
                      [
                          ((d, d.one), "==")
                          for i in eqs
                          for ((n, d), _) in i
                          if d.has(gen)
                      ]
                  ]
              )
              _sol -= exclude
  
          solution |= _sol
  
      if not exact and solution:
          solution = solution.evalf()
  
      if relational:
          solution = solution.as_relational(gen)
  
      return solution
  
imports: import itertools
  from sympy.calculus.util import continuous_domain, periodicity, function_range
  from sympy.core import sympify
  from sympy.core.exprtools import factor_terms
  from sympy.core.relational import Relational, Lt, Ge, Eq
  from sympy.core.symbol import Symbol, Dummy
  from sympy.sets.sets import Interval, FiniteSet, Union, Intersection
  from sympy.core.singleton import S
  from sympy.core.function import expand_mul
  from sympy.functions.elementary.complexes import Abs
  from sympy.logic import And
  from sympy.polys import Poly, PolynomialError, parallel_poly_from_expr
  from sympy.polys.polyutils import _nsort
  from sympy.solvers.solveset import solvify, solveset
  from sympy.utilities.iterables import sift, iterable
  from sympy.utilities.misc import filldedent
label_desc: Use image node_id 4 for calling a global function with example usage: reduce_rational_inequalities(exprs, gen, relational) and returns: solution