def METHOD_NAME(self, inputs, outputs, residuals):
    self._update_internal(inputs, outputs)
    if self.coupled:
        Fext = inputs[self.rhs_name]
    else:
        Fext = None
    self.sp.getResidual(res=residuals[self.states_name], Fext=Fext)