def shebang_matches(text, regex):
    index = text.find('\n')
    if index >= 0:
        first_line = text[:index].lower()
    else:
        first_line = text.lower()
    if first_line.startswith('#!'):
        try:
            found = [x for x in split_path_re.split(first_line[2:].strip())
                     if x and not x.startswith('-')][-1]
        except IndexError:
            return False
        regex = re.compile('^%s(\.(exe|cmd|bat|bin))?$' % regex, re.IGNORECASE)
        if regex.search(found) is not None:
            return True
    return False
Loop through the class namespace looking for Property instances.
dataset/ETHPy150Open joeyb/joeyb-blog/externals/pygments/util.py/shebang_matches--crossover with--dataset/ETHPy150Open espeed/bulbs/bulbs/model.py/ModelMeta._register_properties