'Extracts the return code for the integration to enable better control
if the integration fails.'

def get_return_code(self):

    try:
        self._integrator
    except AttributeError:
        self.set_integrator('')
    return self._integrator.istate
