def _new_state_if_none(self, instance):
        if hasattr(instance, self.STATE_ATTR):
            return False
        elif self.class_ is not instance.__class__ and \
                self.is_mapped:
            # this will create a new ClassManager for the
            # subclass, without a mapper.  This is likely a
            # user error situation but allow the object
            # to be constructed, so that it is usable
            # in a non-ORM context at least.
            return self._subclass_manager(instance.__class__).\
                _new_state_if_none(instance)
        else:
            state = self._state_constructor(instance, self)
            setattr(instance, self.STATE_ATTR, state)
            return state
Returns a tuple of sets of the form (src_set, dest_set)
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/orm/instrumentation.py/ClassManager._new_state_if_none--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/driver.py/Driver.get_expr_var_depends