<commit_before>from willow.image import Image
from willow.registry import registry as _registry

from willow.states import (
    JPEGImageFileState,
    PNGImageFileState,
    GIFImageFileState,
    RGBImageBufferState,
    RGBAImageBufferState,
)
from willow.plugins import pillow, wand, opencv

_registry.register_state_class(JPEGImageFileState)
_registry.register_state_class(PNGImageFileState)
_registry.register_state_class(GIFImageFileState)
_registry.register_state_class(RGBImageBufferState)
_registry.register_state_class(RGBAImageBufferState)

_registry.register_image_format('jpeg', JPEGImageFileState)
_registry.register_image_format('png', PNGImageFileState)
_registry.register_image_format('gif', GIFImageFileState)

_registry.register_plugin(pillow)
_registry.register_plugin(wand)
_registry.register_plugin(opencv)


__version__ = '0.1'<commit_msg>Moved setup code into function<commit_after>from willow.image import Image

def setup():
    from willow.registry import registry

    from willow.states import (
        JPEGImageFileState,
        PNGImageFileState,
        GIFImageFileState,
        RGBImageBufferState,
        RGBAImageBufferState,
    )
    from willow.plugins import pillow, wand, opencv

    registry.register_state_class(JPEGImageFileState)
    registry.register_state_class(PNGImageFileState)
    registry.register_state_class(GIFImageFileState)
    registry.register_state_class(RGBImageBufferState)
    registry.register_state_class(RGBAImageBufferState)

    registry.register_image_format('jpeg', JPEGImageFileState)
    registry.register_image_format('png', PNGImageFileState)
    registry.register_image_format('gif', GIFImageFileState)

    registry.register_plugin(pillow)
    registry.register_plugin(wand)
    registry.register_plugin(opencv)

setup()

__version__ = '0.1'
{'fraction_non_alphanumeric': 0.07076247942951179, 'fraction_numerical': 0.0021941854086670325, 'mean_word_length': 6.152941176470589, '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': '189231', 'n_tokens_mistral': 565, 'n_tokens_neox': 551, 'n_words': 84}