<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_rhs(self, rhs):
 """Set the right hand side. This matrix will be modified in place."""

        assert rhs.size == self.id.n
        self._refs.update(rhs=rhs)
        self.id.rhs = self.cast_array(rhs)