code: def is_pell_transformation_ok(eq):
      """
      Test whether X*Y, X, or Y terms are present in the equation
      after transforming the equation using the transformation returned
      by transformation_to_pell(). If they are not present we are good.
      Moreover, coefficient of X**2 should be a divisor of coefficient of
      Y**2 and the constant term.
      """
      A, B = transformation_to_DN(eq)
      u = (A * Matrix([X, Y]) + B)[0]
      v = (A * Matrix([X, Y]) + B)[1]
      simplified = diop_simplify(eq.subs(zip((x, y), (u, v))))
  
      coeff = dict(
          [reversed(t.as_independent(*[X, Y])) for t in simplified.args]
      )
  
      for term in [X * Y, X, Y]:
          if term in coeff.keys():
              return False
  
      for term in [X**2, Y**2, 1]:
          if term not in coeff.keys():
              coeff[term] = 0
  
      if coeff[X**2] != 0:
          return divisible(coeff[Y**2], coeff[X**2]) and divisible(
              coeff[1], coeff[X**2]
          )
  
      return True
  
imports: from sympy.core.add import Add
  from sympy.core.mul import Mul
  from sympy.core.numbers import Rational, oo, pi
  from sympy.core.relational import Eq
  from sympy.core.singleton import S
  from sympy.core.symbol import symbols
  from sympy.matrices.dense import Matrix
  from sympy.ntheory.factor_ import factorint
  from sympy.simplify.powsimp import powsimp
  from sympy.core.function import _mexpand
  from sympy.core.sorting import default_sort_key, ordered
  from sympy.functions.elementary.trigonometric import sin
  from sympy.solvers.diophantine import diophantine
  from sympy.solvers.diophantine.diophantine import diop_DN, diop_solve, diop_ternary_quadratic_normal, diop_general_pythagorean, diop_ternary_quadratic, diop_linear, diop_quadratic, diop_general_sum_of_squares, diop_general_sum_of_even_powers, descent, diop_bf_DN, divisible, equivalent, find_DN, ldescent, length, reconstruct, partition, power_representation, prime_as_sum_of_two_squares, square_factor, sum_of_four_squares, sum_of_three_squares, transformation_to_DN, transformation_to_normal, classify_diop, base_solution_linear, cornacchia, sqf_normal, gaussian_reduce, holzer, check_param, parametrize_ternary_quadratic, sum_of_powers, sum_of_squares, _diop_ternary_quadratic_normal, _nint_or_floor, _odd, _even, _remove_gcd, _can_do_sum_of_squares, DiophantineSolutionSet, GeneralPythagorean, BinaryQuadratic
  from sympy.testing.pytest import slow, raises, XFAIL
  from sympy.utilities.iterables import signed_permutations
label_desc: Use image node_id 18 for calling a global function with example usage: is_pell_transformation_ok(eq) and returns: True, unknown, False