<commit_before>"""Metadata generation logic for source distributions.
"""


def get_metadata_generator(install_req):
    if install_req.use_pep517:
        return install_req.prepare_pep517_metadata
    else:
        return install_req.run_egg_info<commit_msg>Return early for legacy processes<commit_after>"""Metadata generation logic for source distributions.
"""


def get_metadata_generator(install_req):
    if not install_req.use_pep517:
        return install_req.run_egg_info

    return install_req.prepare_pep517_metadata
{'fraction_non_alphanumeric': 0.06591337099811675, 'fraction_numerical': 0.022598870056497175, 'mean_word_length': 5.045454545454546, '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': '2268155', 'n_tokens_mistral': 163, 'n_tokens_neox': 149, 'n_words': 33}