code: def is_allowed(self, request: AxesHttpRequest, credentials: dict = None) -> bool:
          
  
          if self.is_blacklisted(request, credentials):
              return False
  
          if self.is_whitelisted(request, credentials):
              return True
  
          if self.is_locked(request, credentials):
              return False
  
          return True
docs: Checks if the user is allowed to access or use given functionality such as a login view or authentication.
  
          This method is abstract and other backends can specialize it as needed, but the default implementation
          checks if the user has attempted to authenticate into the site too many times through the
          Django authentication backends and returns ``False``if user exceeds the configured Axes thresholds.
  
          This checker can implement arbitrary checks such as IP whitelisting or blacklisting,
          request frequency checking, failed attempt monitoring or similar functions.
  
          Please refer to the ``axes.handlers.database.AxesDatabaseHandler`` for the default implementation
          and inspiration on some common checks and access restrictions before writing your own implementation.