<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def insert_into_shaders(self, vertex, fragment):
 """Apply the insertions to shader code."""

        to_insert = defaultdict(str)
        to_insert.update({key: '\n'.join(self._to_insert[key]) + '\n'
                          for key in self._to_insert})
        return _insert_glsl(vertex, fragment, to_insert)