def solvify(f, symbol, domain):
    'Solves an equation using solveset and returns the solution in accordance\n    with the `solve` output API.\n\n    Returns\n    =======\n\n    We classify the output based on the type of solution returned by `solveset`.\n\n    Solution    |    Output\n    ----------------------------------------\n    FiniteSet   | list\n\n    ImageSet,   | list (if `f` is periodic)\n    Union       |\n\n    EmptySet    | empty list\n\n    Others      | None\n\n\n    Raises\n    ======\n\n    NotImplementedError\n        A ConditionSet is the input.\n\n    Examples\n    ========\n\n    >>> from sympy.solvers.solveset import solvify, solveset\n    >>> from sympy.abc import x\n    >>> from sympy import S, tan, sin, exp\n    >>> solvify(x**2 - 9, x, S.Reals)\n    [-3, 3]\n    >>> solvify(sin(x) - 1, x, S.Reals)\n    [pi/2]\n    >>> solvify(tan(x), x, S.Reals)\n    [0]\n    >>> solvify(exp(x) - 1, x, S.Complexes)\n\n    >>> solvify(exp(x) - 1, x, S.Reals)\n    [0]\n\n    '
    solution_set = solveset(f, symbol, domain)
    result = None
    if (solution_set is S.EmptySet):
        result = []
    elif isinstance(solution_set, ConditionSet):
        raise NotImplementedError('solveset is unable to solve this equation.')
    elif isinstance(solution_set, FiniteSet):
        result = list(solution_set)
    else:
        period = periodicity(f, symbol)
        if (period is not None):
            solutions = S.EmptySet
            if isinstance(solution_set, ImageSet):
                iter_solutions = (solution_set,)
            elif isinstance(solution_set, Union):
                if all((isinstance(i, ImageSet) for i in solution_set.args)):
                    iter_solutions = solution_set.args
            for solution in iter_solutions:
                solutions += solution.intersect(Interval(0, period, False, True))
            if isinstance(solutions, FiniteSet):
                result = list(solutions)
        else:
            solution = solution_set.intersect(domain)
            if isinstance(solution, FiniteSet):
                result += solution
    return result
Solves an equation using solveset and returns the solution in accordance
with the `solve` output API.

Returns
=======

We classify the output based on the type of solution returned by `solveset`.

Solution    |    Output
----------------------------------------
FiniteSet   | list

ImageSet,   | list (if `f` is periodic)
Union       |

EmptySet    | empty list

Others      | None


Raises
======

NotImplementedError
    A ConditionSet is the input.

Examples
========

>>> from sympy.solvers.solveset import solvify, solveset
>>> from sympy.abc import x
>>> from sympy import S, tan, sin, exp
>>> solvify(x**2 - 9, x, S.Reals)
[-3, 3]
>>> solvify(sin(x) - 1, x, S.Reals)
[pi/2]
>>> solvify(tan(x), x, S.Reals)
[0]
>>> solvify(exp(x) - 1, x, S.Complexes)

>>> solvify(exp(x) - 1, x, S.Reals)
[0]
def solvify(f, symbol, domain):
    'Solves an equation using solveset and returns the solution in accordance\n    with the `solve` output API.\n\n    Returns\n    =======\n\n    We classify the output based on the type of solution returned by `solveset`.\n\n    Solution    |    Output\n    ----------------------------------------\n    FiniteSet   | list\n\n    ImageSet,   | list (if `f` is periodic)\n    Union       |\n\n    EmptySet    | empty list\n\n    Others      | None\n\n\n    Raises\n    ======\n\n    NotImplementedError\n        A ConditionSet is the input.\n\n    Examples\n    ========\n\n    >>> from sympy.solvers.solveset import solvify, solveset\n    >>> from sympy.abc import x\n    >>> from sympy import S, tan, sin, exp\n    >>> solvify(x**2 - 9, x, S.Reals)\n    [-3, 3]\n    >>> solvify(sin(x) - 1, x, S.Reals)\n    [pi/2]\n    >>> solvify(tan(x), x, S.Reals)\n    [0]\n    >>> solvify(exp(x) - 1, x, S.Complexes)\n\n    >>> solvify(exp(x) - 1, x, S.Reals)\n    [0]\n\n    '
    solution_set = solveset(f, symbol, domain)
    result = None
    if (solution_set is S.EmptySet):
        result = []
    elif isinstance(solution_set, ConditionSet):
        raise NotImplementedError('solveset is unable to solve this equation.')
    elif isinstance(solution_set, FiniteSet):
        result = list(solution_set)
    else:
        period = periodicity(f, symbol)
        if (period is not None):
            solutions = S.EmptySet
            if isinstance(solution_set, ImageSet):
                iter_solutions = (solution_set,)
            elif isinstance(solution_set, Union):
                if all((isinstance(i, ImageSet) for i in solution_set.args)):
                    iter_solutions = solution_set.args
            for solution in iter_solutions:
                solutions += solution.intersect(Interval(0, period, False, True))
            if isinstance(solutions, FiniteSet):
                result = list(solutions)
        else:
            solution = solution_set.intersect(domain)
            if isinstance(solution, FiniteSet):
                result += solution
    return result