def insert_text(self, index, text):
        """Instantiate objects from characters and insert.

        index (integer)
            specific index before which to begin inserting
            the instantiated objects.
        text (string)
            characters to be inserted in the line.

        Rearrange positions at the end.
        """
        for next_index, char in enumerate(text, start=index):

            self.insert(next_index, CachedTextObject(char, self.render_settings))

        self.reposition_chars()
Instantiate objects from characters and insert.

        index (integer)
            specific index before which to begin inserting
            the instantiated objects.
        text (string)
            characters to be inserted in the line.

        Rearrange positions at the end.
        
nodezator/textman/editor/line.py