linked lists class positionallistdoublylinkedbase) """ sequential container of elements allowing positional access "" nested position class class position """an abstraction representing the location of single element "" def init (selfcontainernode) """constructor should not be invoked by user "" self container container self node node def element(self) """return the element stored at this position "" return self node element def eq (selfother) """return true if other is position representing the same location "" return type(otheris type(selfand other node is self node def ne (selfother) """return true if other does not represent the same location "" return not (self =otheropposite of eq utility method def validate(selfp) """return position nodeor raise appropriate error if invalid "" if not isinstance(pself position) raise typeerrorp must be proper position type if container is not self raise valueerrorp does not belong to this container convention for deprecated nodes if node next is none raise valueerrorp is no longer valid return node code fragment positionallist class based on doubly linked list (continues in code fragments and