<commit_before>from datetime import timedelta
import operator
from operator import add
from time import time

import pytest

from tornado import gen
from tornado.queues import Queue
from tornado.ioloop import IOLoop

import streams as s

from ..core import Stream
from ..graph import create_graph
from streams.sources import sink_to_file, Counter
from streams.utils_test import inc, double, gen_test, tmpfile

import networkx as nx


def test_create_graph():
    source1 = Stream(name='source1')
    source2 = Stream(name='source2')

    n1 = source1.zip(source2)
    n2 = n1.map(add)
    n2.sink(source1.emit)
<commit_msg>MTN: removed unused imports<commit_after>from operator import add

import networkx as nx

from ..core import Stream
from ..graph import create_graph


def test_create_graph():
    source1 = Stream(name='source1')
    source2 = Stream(name='source2')

    n1 = source1.zip(source2)
    n2 = n1.map(add)
    n2.sink(source1.emit)

{'fraction_non_alphanumeric': 0.08096740273396424, 'fraction_numerical': 0.023133543638275498, 'mean_word_length': 4.318435754189944, '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': '4010899', 'n_tokens_mistral': 311, 'n_tokens_neox': 301, 'n_words': 97}