<commit_before>try:
    import cPickle as pickle
except ImportError:
    import pickle
import contextlib
import os.path
import tempfile
try:  # Python 2
    from cStringIO import StringIO as BytesIO
except ImportError:  # Python 3
    from io import BytesIO

import numpy as np
import pandas as pd

from xray import Dataset, open_dataset, backends
from xray.pycompat import iteritems, itervalues

from . import TestCase, requires_scipy, requires_netCDF4, requires_pydap
from test_dataset import create_test_data

try:
    import netCDF4 as nc4
except ImportError:
    pass


def open_example_dataset(name):
    return open_dataset(os.path.join(os.path.dirname(__file__), 'data', name))<commit_msg>Relative import in tests<commit_after>try:
    import cPickle as pickle
except ImportError:
    import pickle
import contextlib
import os.path
import tempfile
try:  # Python 2
    from cStringIO import StringIO as BytesIO
except ImportError:  # Python 3
    from io import BytesIO

import numpy as np
import pandas as pd

from xray import Dataset, open_dataset, backends
from xray.pycompat import iteritems, itervalues

from . import TestCase, requires_scipy, requires_netCDF4, requires_pydap
from .test_dataset import create_test_data

try:
    import netCDF4 as nc4
except ImportError:
    pass


def open_example_dataset(name):
    return open_dataset(os.path.join(os.path.dirname(__file__), 'data', name))
{'fraction_non_alphanumeric': 0.05334281650071124, 'fraction_numerical': 0.007112375533428165, 'mean_word_length': 4.742857142857143, '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': '621787', 'n_tokens_mistral': 449, 'n_tokens_neox': 440, 'n_words': 152}