<commit_before>from restclients.exceptions import InvalidSectionID
from restclients.sws.v5.section import section_label_pattern
from restclients.sws import get_resource, encode_section_label
from restclients.models.sws import SectionStatus

course_res_url_prefix = "/student/v5/course"

def get_section_status_by_label(label):
    import warnings
    warnings.warn("Totally untested against live resources!  Don't count on get_section_status_by_label in v5!")

    if not section_label_pattern.match(label):
        raise InvalidSectionID(label)
<commit_msg>This has been in production for a while!<commit_after>from restclients.exceptions import InvalidSectionID
from restclients.sws.v5.section import section_label_pattern
from restclients.sws import get_resource, encode_section_label
from restclients.models.sws import SectionStatus

course_res_url_prefix = "/student/v5/course"

def get_section_status_by_label(label):
    if not section_label_pattern.match(label):
        raise InvalidSectionID(label)

{'fraction_non_alphanumeric': 0.06045589692765114, 'fraction_numerical': 0.004955401387512388, 'mean_word_length': 6.426470588235294, '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': '7041820', 'n_tokens_mistral': 301, 'n_tokens_neox': 298, 'n_words': 72}