<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(self, index, child, **kwargs):
        '''add a new script to the container.

        :param child: a ``string`` representing an absolute path to the script
            or relative path (does not start with ``http`` or ``/``), in which
            case the :attr:`Media.media_path` attribute is prepended.
        '''
        if child:
            script = self.script(child, **kwargs)
            if script not in self.children:
                if index is None:
                    self.children.append(script)
                else:
                    self.children.insert(index, script)