<commit_before>class Node(object):
    def __init__(self, value, succeeding=None, previous=None):
        self.value = value
        self.succeeding = succeeding
        self.previous = previous


class LinkedList(object):

    def __init__(self):
        self.head = None
        self.tail = None

    def push(self, value):
        new_node = Node(value)
        if self.tail is not None:
            self.tail.succeeding = new_node
            new_node.previous = self.tail
        self.tail = new_node
        if self.head is None:
            self.head = new_node

    def pop(self):
        if self.tail is not None:
            popped_node = self.tail
            self.tail = popped_node.previous
            return popped_node.value

    def unshift(self, value):
        pass

    def shift(self):
        if self.head is not None:
            shifted_node = self.head
            self.head = shifted_node.succeeding
            return shifted_node.value<commit_msg>Implement unshift<commit_after>class Node(object):
    def __init__(self, value, succeeding=None, previous=None):
        self.value = value
        self.succeeding = succeeding
        self.previous = previous


class LinkedList(object):

    def __init__(self):
        self.head = None
        self.tail = None

    def push(self, value):
        new_node = Node(value)
        if self.tail is not None:
            self.tail.succeeding = new_node
            new_node.previous = self.tail
        self.tail = new_node
        if self.head is None:
            self.head = new_node

    def pop(self):
        if self.tail is not None:
            popped_node = self.tail
            self.tail = popped_node.previous
            return popped_node.value

    def unshift(self, value):
        new_node = Node(value)
        if self.head is not None:
            self.head.previous = new_node
            new_node.succeeding = self.head
        self.head = new_node
        if self.tail is None:
            self.tail = new_node

    def shift(self):
        if self.head is not None:
            shifted_node = self.head
            self.head = shifted_node.succeeding
            return shifted_node.value
{'fraction_non_alphanumeric': 0.0782967032967033, 'fraction_numerical': 0.0, 'mean_word_length': 1.7976952624839948, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5265966', 'n_tokens_mistral': 632, 'n_tokens_neox': 606, 'n_words': 164}