def _needs_iteration(comp):
    """Return True if the given component needs an iterative
    solver to converge it.
    """
    if isinstance(comp, Component) and comp.is_active() and comp.states:
        for klass in comp.__class__.__mro__:
            if klass is Component:
                break
            if 'solve_linear' in klass.__dict__:
                # class has defined it's own solve_linear
                return  False
        return True
    return False
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/core/problem.py/_needs_iteration/original