<commit_before>from lab.nodes import LabNode
from lab.nodes.n9k import Nexus


class Tor(Nexus):
    ROLE = 'tor'
    ROLE_OCTET = 'XX'


class Oob(Nexus):
    ROLE = 'oob'
    ROLE_OCTET = 'XX'

    def correct_port_id(self, port_id, from_node=None):
        err_msg = '{} {}: port id "{}" is wrong, it has to be <number>/<number>/<number>'.format('{} -> '.format(from_node) if from_node else '', self, port_id)
        i = 0
        for i, value in enumerate(port_id.split('/'), start=1):
            try:
                int(value)
            except ValueError:
                raise ValueError(err_msg)
        if i != 3:
            raise ValueError(err_msg)
        return 'Gig' + port_id


class Pxe(Nexus):
    ROLE = 'pxe'
    ROLE_OCTET = 'XX'


class Terminal(LabNode):
    ROLE = 'terminal'
    ROLE_OCTET = 'XX'

    def cmd(self, cmd):
        raise NotImplementedError
<commit_msg>Typo in tor.py<commit_after>from lab.nodes import LabNode
from lab.nodes.n9k import Nexus


class Tor(Nexus):
    ROLE = 'tor'
    ROLE_OCTET = 'XX'


class Oob(Nexus):
    ROLE = 'oob'
    ROLE_OCTET = 'XX'

    def correct_port_id(self, port_id, from_node=None):
        err_msg = '{} {}: port id "{}" is wrong, it has to be <number>/<number>/<number>'.format('{} -> '.format(from_node) if from_node else '', self, port_id)
        i = 0
        for i, value in enumerate(port_id.split('/'), start=1):
            try:
                int(value)
            except ValueError:
                raise ValueError(err_msg)
        if i != 2:
            raise ValueError(err_msg)
        return 'Gig' + port_id


class Pxe(Nexus):
    ROLE = 'pxe'
    ROLE_OCTET = 'XX'


class Terminal(LabNode):
    ROLE = 'terminal'
    ROLE_OCTET = 'XX'

    def cmd(self, cmd):
        raise NotImplementedError

{'fraction_non_alphanumeric': 0.1298050139275766, 'fraction_numerical': 0.004456824512534819, 'mean_word_length': 2.2773722627737225, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '4845396', 'n_tokens_mistral': 666, 'n_tokens_neox': 629, 'n_words': 160}