def test_issue_9165():
    z = Symbol('z', zero=True)
    f = Symbol('f', finite=False)
    assert 0/z == S.NaN
    assert 0*(1/z) == S.NaN
    assert 0*f == S.NaN
dataset/ETHPy150Open sympy/sympy/sympy/core/tests/test_assumptions.py/test_issue_9165/original