human
Complete the below
def _exponents(expr, x):

    ''''Find the exponents of ``x`` (not including zero) in ``expr``.
    >>> from sympy.integrals.meijerint import _exponents
    >>> from sympy.abc import x, y
    >>> from sympy import sin
    >>> _exponents(x, x)
    {1}
    >>> _exponents(x**2, x)
    {2}
    >>> _exponents(x**2 + x, x)
    {1, 2}
    >>> _exponents(x**3*sin(x + x**y) + 1/x, x)
    {-1, 1, 3, y}'
    '''
assistant
#Here is Python code to find the exponents of ``x`` (not including zero) in ``expr``.
    def _exponents_(expr, x, res):
        if (expr == x):
            res.update([1])
            return
        if (expr.is_Pow and (expr.base == x)):
            res.update([expr.exp])
            return
        for arg in expr.args:
            _exponents_(arg, x, res)
    res = set()
    _exponents_(expr, x, res)
    return res