<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_user_attempts(request: AxesHttpRequest, credentials: dict = None) -> QuerySet: """ Return a queryset of AccessAttempts that match the given request and credentials. """


    username = get_client_username(request, credentials)

    filter_kwargs = get_client_parameters(username, request.axes_ip_address, request.axes_user_agent)

    return AccessAttempt.objects.filter(**filter_kwargs)