def resolve_fractions(a, b):
 a_is_fraction = isinstance(a, Fraction)
 b_is_fraction = isinstance(b, Fraction)
 if (a_is_fraction and (not b_is_fraction)):
  b = Fraction(b)
 elif ((not a_is_fraction) and b_is_fraction):
  a = Fraction(a)
 return (a, b)

def resolve_fractions ( a , b ) : a_is_fraction = isinstance ( a , Fraction ) b_is_fraction = isinstance ( b , Fraction ) if ( a_is_fraction and ( not b_is_fraction ) ) : b = Fraction ( b ) elif ( ( not a_is_fraction ) and b_is_fraction ) : a = Fraction ( a ) return ( a , b )
if either input is a fraction .