code: def insert(self, index, function, update=True):
          
          self._funcs.insert(index, function)
          self._add_dep(function)
          if update:
              self._update()
docs: Insert a new function into the chain at *index*.