I am trying to extract numerator and denominator of expression using sympy.fraction method.
The code is as follows-

```
from sympy import *
x=symbols('x')
a=1/(1+1/x)
print(fraction(a))

```

The output that I want is 

> 
> (x,x+1)
> 
> 
> 

but it is outputting 

> 
> (1, 1+1/x)
> 
> 
>