<commit_before>""" TCV MDS datasource """

from itertools import cycle

import xray

from .datasource import DataSource

# Defer ImportError till the first use of the mds module. This hack is only
# here to make the documentation compile on readthedocs.org.
try:
    import MDSplus as mds
except ImportError:
    class Mock(object):
        def __getattr__(self, attr):
            raise ImportError("MDSplus was not successfuly imported")
    mds = Mock()


class MDSConnection(DataSource):
    """ Generic MDSPlus datasource """

    _MAX_DIMS = 5
<commit_msg>Don't show mock object in the docs.<commit_after>""" TCV MDS datasource """

from itertools import cycle

import xray

from .datasource import DataSource

# Defer ImportError till the first use of the mds module. This hack is only
# here to make the documentation compile on readthedocs.org.
try:
    import MDSplus as mds
except ImportError:
    class _Mock(object):
        def __getattr__(self, attr):
            raise ImportError("MDSplus was not successfuly imported")
    mds = _Mock()


class MDSConnection(DataSource):
    """ Generic MDSPlus datasource """

    _MAX_DIMS = 5

{'fraction_non_alphanumeric': 0.07317073170731707, 'fraction_numerical': 0.0017421602787456446, 'mean_word_length': 3.596, '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': '590672', 'n_tokens_mistral': 348, 'n_tokens_neox': 335, 'n_words': 132}