code: def fracgcd(p, q):
      x, y = p, q
      while y:
          x, y = y, x % y
      if x != 1:
          p //= x
          q //= x
      if q == 1:
          return p
      return p, q
  
file_path: catboost/contrib/python/mpmath/py3/mpmath/identification.py
imports: from .libmp.backend import xrange
  from .libmp import int_types, sqrt_fixed
label_desc: Use image node_id 4 for calling a global function with example usage: fracgcd(p, q) and returns: p,  q, p