def METHOD_NAME(file, check):
    """Return true if the file uses the http wrapper class.
    Also outputs every instance of deprecated request library function use
    file -- filepath of file to validate
    check -- name of the check
    """
    file_uses_http_wrapper = False
    has_failed = False
    error_message = ''
    with open(file, 'r', encoding='utf-8') as f:
        read_file = f.read()
        found_match_arg = re.search(r'auth=|header=', read_file)
        found_http = re.search(r'self.http|OpenMetricsBaseCheck', read_file)
        skip_validation = re.search(r'SKIP_HTTP_VALIDATION', read_file)
        http_func = re.search(REQUEST_LIBRARY_FUNC_RE, read_file)
        if http_func and not skip_validation:
            error_message += (
                f'Check `{check}` uses `{http_func.group(0)}` in `{os.path.basename(file)}`, '
                f'please use the HTTP wrapper instead\n'
                f'If this a genuine usage of the parameters, '
                f'please inline comment `# SKIP_HTTP_VALIDATION`'
            )
            return False, True, None, error_message
        if found_http and not skip_validation:
            return found_http, has_failed, found_match_arg, error_message
    return file_uses_http_wrapper, has_failed, None, error_message