<jupyter_start><jupyter_text>Introduction<jupyter_code>from dsvisualizer import *
class Node(LinkedListMixin):
    val = ValueField()
    next = NextField()
    def __init__(self, v, n):
        self.val = v
        self.next = n

class List(Container):
    def __init__(self):
        super().__init__()
        self.head = None

    def push(self, v):
        self.head = Node(v, self.head)

    def append(self, v):
        head = self.head
        if head is None:
            self.head = Node(v, None)
            return
        
        node = self.head
        while (n := node.next) is not None:
            node = n
        node.next = Node(v, None)
l = List()

l.append(0)
l.append(1)
l.append(2)
l.append(3)
l.push(-1)
l.push(-2)

l.visualize()
l.append(15)
l.visualize()
with Logger() as logger:
    n = Node(5, Node(10, Node(20, None)))
logger.visualize()
with logger:
    n = Node(10, n)
logger.visualize()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14105263157894737, 'fraction_numerical': 0.015789473684210527, 'mean_word_length': 2.336842105263158, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '555672', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 353, 'n_tokens_neox': 341, 'n_words': 83, 'path': 'examples/introduction.ipynb', 'repo_name': 'romero-jose/dsvisualizer', 'size': '950'}