<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pull(self, *, index=None):
 """Pull item from the chain. """

        item = self.__list.pop(index)
        name = getattr(item, 'name', None)
        if name is not None:
            del self.__dict[name]
        return item