<commit_before>import pkg_resources

loaded = set()


def load_entry_points(name=None):
    for entry_point in pkg_resources.iter_entry_points(group='segpy.ext', name=name):
        package = entry_point.load()
        if package not in loaded:
            loaded.add(package)
            __path__.extend(package.__path__)
            package.load()


load_entry_points()<commit_msg>Docstring for segpy.ext.load_packages()<commit_after>import pkg_resources

loaded = set()


def load_entry_points(name=None):
    """Load extension packages into the segpy.ext namespace.

    Any packages registered against the 'segpy.ext' entry-point group will be
    installed dynamically into the segpy.ext namespace.
    """
    for entry_point in pkg_resources.iter_entry_points(group='segpy.ext', name=name):
        package = entry_point.load()
        if package not in loaded:
            loaded.add(package)
            __path__.extend(package.__path__)
            package.load()


load_entry_points()
{'fraction_non_alphanumeric': 0.09236947791164658, 'fraction_numerical': 0.0, 'mean_word_length': 3.2606837606837606, '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': '4188294', 'n_tokens_mistral': 290, 'n_tokens_neox': 279, 'n_words': 68}