<commit_before>import logging
from contextlib import contextmanager

from ..errors import *

from .state import State
from .core import Object, BoundObject, Type

# Python predefines
Module = None

def checkCompatibility(type1:Type, type2:Type):
    if type1.checkCompatibility(type2):
        return True
    elif type2.checkCompatibility(type1):
        return True
    return False

# Resolves a reference inside of a given scope.
def resolveReference(reference:str):
    # Collect all objects with a name matching reference up the tree of scopes
    found = []

    scope = State.scope
    while True:
        context = scope.local_context

        if context is not None and reference in context:
            found.append(context[reference])

        # Go to builtins once the top of the tree is reached, otherwise move up
        if scope is State.builtins:
            break
        else:<commit_msg>Style fix<commit_after>import logging
from contextlib import contextmanager

from ..errors import *

from .state import State
from .core import Object, BoundObject, Type

# Python predefines
Module = None

def checkCompatibility(type1:Type, type2:Type):
    if type1.checkCompatibility(type2):
        return True
    return type2.checkCompatibility(type1)

# Resolves a reference inside of a given scope.
def resolveReference(reference:str):
    # Collect all objects with a name matching reference up the tree of scopes
    found = []

    scope = State.scope
    while True:
        context = scope.local_context

        if context is not None and reference in context:
            found.append(context[reference])

        # Go to builtins once the top of the tree is reached, otherwise move up
        if scope is State.builtins:
            break
        else:
{'fraction_non_alphanumeric': 0.0580608793686584, 'fraction_numerical': 0.006764374295377677, 'mean_word_length': 2.9444444444444446, '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': '478405', 'n_tokens_mistral': 464, 'n_tokens_neox': 455, 'n_words': 188}