<commit_before>"""Represents and manage a worker node."""
import pyslurm


class Node(object):
    """Represent a worker node."""

    def __init__(self, node):
        """Initialize the current object."""
        self._node = node

    @property
    def name(self):
        """Name of the node, as reported by Slurm."""
        return self._node.get('name')

    @property
    def state(self):
        """Node state, as reported by Slurm."""
        return self._node.get('state')

    def _set_node_state(self, state, reason=None):
        """Set the node state to the provided argument."""
        node_dict = {
            'node_names': self.name,
            'node_state': state,<commit_msg>Add ip property to Node<commit_after>"""Represents and manage a worker node."""
import pyslurm


class Node(object):
    """Represent a worker node."""

    def __init__(self, node):
        """Initialize the current object."""
        self._node = node

    @property
    def name(self):
        """Name of the node, as reported by Slurm."""
        return self._node.get('name')

    @property
    def state(self):
        """Node state, as reported by Slurm."""
        return self._node.get('state')

    @property
    def ip(self):
        """IP address for the node."""
        return self._node.get('node_addr')

    def _set_node_state(self, state, reason=None):
        """Set the node state to the provided argument."""
        node_dict = {
            'node_names': self.name,
            'node_state': state,
{'fraction_non_alphanumeric': 0.13381674357284112, 'fraction_numerical': 0.0, 'mean_word_length': 2.4266365688487586, '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': '5737126', 'n_tokens_mistral': 431, 'n_tokens_neox': 425, 'n_words': 141}