def METHOD_NAME(name_to_search, subtype, r_pos=False):
    pgps = {}
    # for subtype in subtypes:
    r_name = sanitize_pgp_name_to_search(name_to_search, subtype)
    if not name_to_search or isinstance(r_name, dict):
        # break
        return pgps
    r_name = re.compile(r_name)
    for pgp_name in get_all_pgps_by_subtype(subtype):
        res = re.search(r_name, pgp_name)
        if res:
            pgps[pgp_name] = {}
            if r_pos:
                pgps[pgp_name]['hl-start'] = res.start()
                pgps[pgp_name]['hl-end'] = res.end()
    return pgps