<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply_set(self, ty):
 """ Apply Jacobian set values to matrices :param ty: Jacobian type in ``('jac0', 'jac')`` :return: """

        assert ty in ('jac0', 'jac')

        if ty == 'jac0':
            todo = ['Fx0', 'Fy0', 'Gx0', 'Gy0']
        else:
            todo = ['Fx', 'Fy', 'Gx', 'Gy']

        for m in todo:
            for idx in range(len(self._set[m]['I'])):
                i = self._set[m]['I'][idx]
                j = self._set[m]['J'][idx]
                v = self._set[m]['V'][idx]
                self.__dict__[m][i, j] = v