def METHOD_NAME(requested_version, available_libs):
    req_ver_first, req_ver_second = [int(v) for v in requested_version.split('.', 2)]
    selected_ver = None
    for file in available_libs:
        re_match = re.search(r".*(\d+)_(\d+).*", file)
        if re_match is None:
            continue
        ver_first, ver_second = [int(v) for v in re_match.groups()]
        if ver_first == req_ver_first:
            if ver_second <= req_ver_second and (selected_ver is None or
                                                 selected_ver < (ver_first, ver_second)):
                selected_ver = (ver_first, ver_second)
    return '.'.join([str(v) for v in selected_ver]) if selected_ver is not None else None