<commit_before>import glob
import os
import re


def parse_families(sdk_directory):
    """
    Index all available families from the SDK.
    """

    folders = glob.glob(os.path.join(sdk_directory, "Device/SiliconLabs/*"))
    families = []

    for folder in folders:
        if not os.path.isdir(folder):
            continue<commit_msg>Check for SDK folder.<commit_after>import glob
import os
import re


def parse_families(sdk_directory):
    """
    Index all available families from the SDK.
    """

    if not os.path.isdir(os.path.join(sdk_directory, "Device/SiliconLabs")):
        raise Exception(
            "Specified SDK directory does not contain 'Device/' folder.")

    folders = glob.glob(os.path.join(sdk_directory, "Device/SiliconLabs/*"))
    families = []

    for folder in folders:
        if not os.path.isdir(folder):
            continue
{'fraction_non_alphanumeric': 0.10841983852364476, 'fraction_numerical': 0.0, 'mean_word_length': 2.8577777777777778, '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': '3174969', 'n_tokens_mistral': 269, 'n_tokens_neox': 251, 'n_words': 70}