<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_locked(self, request: AxesHttpRequest, credentials: dict = None) -> bool: """ Checks if the request or given credentials are locked. """


        if settings.AXES_LOCK_OUT_AT_FAILURE:
            return self.get_failures(request, credentials) >= settings.AXES_FAILURE_LIMIT

        return False