<commit_before>from von_agent.nodepool import NodePool
from von_agent.agents import Issuer as VonIssuer
from von_agent.agents import Verifier as VonVerifier
from von_agent.agents import HolderProver as VonHolderProver

import logging
logger = logging.getLogger(__name__)


class Issuer:
    def __init__(self):
        self.pool = NodePool(
            'the-org-book-issuer',
            '/opt/app-root/genesis')

        self.instance = VonIssuer(
            self.pool,
            'the_org_book_issuer_000000000000',
            'TheOrgBook Issuer Wallet',
            None,
            '127.0.0.1',
            9703,
            'api/v0')

    async def __aenter__(self):
        await self.pool.open()
        return await self.instance.open()

    async def __aexit__(self, exc_type, exc_value, traceback):
        if exc_type is not None:
            logger.error(exc_type, exc_value, traceback)

        await self.instance.close()
        await self.pool.close()


class Verifier:
    def __init__(self):
        self.pool = NodePool(
            'the-org-book-verifier',
            '/opt/app-root/genesis')

        self.instance = VonVerifier(
            self.pool,
            'the_org_book_verifier_0000000000',
            'TheOrgBook Verifier Wallet',
            None,
            '127.0.0.1',
            9703,
            'api/v0')

    async def __aenter__(self):
        await self.pool.open()
        return await self.instance.open()

    async def __aexit__(self, exc_type, exc_value, traceback):
        if exc_type is not None:
            logger.error(exc_type, exc_value, traceback)

        await self.instance.close()
        await self.pool.close()


class Holder:
    def __init__(self):
        self.pool = NodePool(
            'the-org-book-holder',
            '/opt/app-root/genesis')

        self.issuer = VonHolderProver(
            self.pool,
            'the_org_book_holder_000000000000',
            'TheOrgBook Holder Wallet',
            None,
            '127.0.0.1',
            9703,
            'api/v0')

    async def __aenter__(self):
        await self.pool.open()
        await self.create_master_secret('secret')
        return await self.instance.open()<commit_msg>fix bad reference to holder instance<commit_after>from von_agent.nodepool import NodePool
from von_agent.agents import Issuer as VonIssuer
from von_agent.agents import Verifier as VonVerifier
from von_agent.agents import HolderProver as VonHolderProver

import logging
logger = logging.getLogger(__name__)


class Issuer:
    def __init__(self):
        self.pool = NodePool(
            'the-org-book-issuer',
            '/opt/app-root/genesis')

        self.instance = VonIssuer(
            self.pool,
            'the_org_book_issuer_000000000000',
            'TheOrgBook Issuer Wallet',
            None,
            '127.0.0.1',
            9703,
            'api/v0')

    async def __aenter__(self):
        await self.pool.open()
        return await self.instance.open()

    async def __aexit__(self, exc_type, exc_value, traceback):
        if exc_type is not None:
            logger.error(exc_type, exc_value, traceback)

        await self.instance.close()
        await self.pool.close()


class Verifier:
    def __init__(self):
        self.pool = NodePool(
            'the-org-book-verifier',
            '/opt/app-root/genesis')

        self.instance = VonVerifier(
            self.pool,
            'the_org_book_verifier_0000000000',
            'TheOrgBook Verifier Wallet',
            None,
            '127.0.0.1',
            9703,
            'api/v0')

    async def __aenter__(self):
        await self.pool.open()
        return await self.instance.open()

    async def __aexit__(self, exc_type, exc_value, traceback):
        if exc_type is not None:
            logger.error(exc_type, exc_value, traceback)

        await self.instance.close()
        await self.pool.close()


class Holder:
    def __init__(self):
        self.pool = NodePool(
            'the-org-book-holder',
            '/opt/app-root/genesis')

        self.issuer = VonHolderProver(
            self.pool,
            'the_org_book_holder_000000000000',
            'TheOrgBook Holder Wallet',
            None,
            '127.0.0.1',
            9703,
            'api/v0')

    async def __aenter__(self):
        await self.pool.open()
        await self.instance.create_master_secret('secret')
        return await self.instance.open()
{'fraction_non_alphanumeric': 0.09754464285714286, 'fraction_numerical': 0.029910714285714287, 'mean_word_length': 1.896574014221073, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 6, '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': '6783413', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1333, 'n_words': 294}