<commit_before>def load(optparser, options):
    if not options.adapter:
        optparser.error("--adapter must be specified")
    mod_name = options.adapter
    mod = __import__(mod_name)
    cls = getattr(mod, mod_name)
    adapter = cls(options)
    return adapter


def add_options(optparser):
    optparser.add_option('', '--debug', action="store_true",
            help='Debug logging')
    optparser.add_option('-a', '--adapter',
            help='Use specified JTAG adapter plugin')
    optparser.add_option('-p', '--port',
            help='Port/device adapter uses')<commit_msg>Actually implement --debug command line option.<commit_after>import logging


def load(optparser, options):
    if not options.adapter:
        optparser.error("--adapter must be specified")
    if options.debug:
        logging.basicConfig(level=logging.DEBUG)
    mod_name = options.adapter
    mod = __import__(mod_name)
    cls = getattr(mod, mod_name)
    adapter = cls(options)
    return adapter


def add_options(optparser):
    optparser.add_option('', '--debug', action="store_true",
            help='Debug logging')
    optparser.add_option('-a', '--adapter',
            help='Use specified JTAG adapter plugin')
    optparser.add_option('-p', '--port',
            help='Port/device adapter uses')
{'fraction_non_alphanumeric': 0.13076923076923078, 'fraction_numerical': 0.0, 'mean_word_length': 3.13015873015873, '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': '6155644', 'n_tokens_mistral': 379, 'n_tokens_neox': 374, 'n_words': 89}