<commit_before>from pseudo.pseudo_tree import Node, call, method_call, local, assignment, to_node
from pseudo.api_handlers import BizarreLeakingNode, NormalLeakingNode

def contains(receiver, element, pseudo_type):
    return Node('_py_in', value=element, sequence=receiver, pseudo_type='Boolean')

def to_py_generatorcomp(method):
    def x(receiver, test, pseudo_type):
        return call(
                   local(method, ['Function', test.pseudo_type, 'Boolean']),
                   [Node('_py_generatorcomp',
                        sequences=Node('for_sequence', sequence=receiver),
                        iterators=Node('for_iterator', iterator=local(test.params[0], test.pseudo_type[1])),
                        block=test.block[0],
                        test=None,
                        pseudo_type=['PyGenerator', 'Boolean'])],
                    pseudo_type='Boolean')
    return x

def expand_map(receiver, func):
    if func.type == 'lambda':
        return Node(
            '_py_list_comp',
            sequence=receiver)
    else:
        return call('map', [func, receiver])

def expand_filter(receiver, func):
    if func.type == 'lambda':
        return Node(
            '_py_list_comp')
    else:
        return call('filter', [func, receiver])

def expand_set_slice(receiver, from_=None, to=None, value=None, pseudo_type=None):
    s = expand_slice(receiver, from_, to, pseudo_type)
    return assignment(s, value)
<commit_msg>Remove unused code<commit_after>from pseudo.pseudo_tree import Node, call, method_call, local, assignment, to_node
from pseudo.api_handlers import BizarreLeakingNode, NormalLeakingNode

def contains(receiver, element, pseudo_type):
    return Node('_py_in', value=element, sequence=receiver, pseudo_type='Boolean')

def to_py_generatorcomp(method):
    def x(receiver, test, pseudo_type):
        return call(
                   local(method, ['Function', test.pseudo_type, 'Boolean']),
                   [Node('_py_generatorcomp',
                        sequences=Node('for_sequence', sequence=receiver),
                        iterators=Node('for_iterator', iterator=local(test.params[0], test.pseudo_type[1])),
                        block=test.block[0],
                        test=None,
                        pseudo_type=['PyGenerator', 'Boolean'])],
                    pseudo_type='Boolean')
    return x

def expand_set_slice(receiver, from_=None, to=None, value=None, pseudo_type=None):
    s = expand_slice(receiver, from_, to, pseudo_type)
    return assignment(s, value)

{'fraction_non_alphanumeric': 0.11459968602825746, 'fraction_numerical': 0.002354788069073783, 'mean_word_length': 2.7595870206489677, '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': '3008658', 'n_tokens_mistral': 728, 'n_tokens_neox': 715, 'n_words': 155}