original_docstring: 
      If the given credentials are valid, return a User object.
      
docstring: If the given credentials are valid, return a User object.
docstring_tokens: If the given credentials are valid return a User object .
code: async def authenticate(request=None, **credentials):
      """
      If the given credentials are valid, return a User object.
      """
      for backend, backend_path in _get_backends(return_tuples=True):
          try:
              inspect.getcallargs(backend.authenticate, request, **credentials)
          except TypeError:
              # This backend doesn't accept these credentials as arguments. Try the next one.
              continue
          try:
              user = await backend.authenticate(request, **credentials)
          except PermissionDenied:
              # This backend says to stop in our tracks - this user should not be allowed in at all.
              break
          if user is None:
              continue
          # Annotate the user object with the path of the backend.
          user.backend = backend_path
          return user
code_tokens: async def authenticate ( request = None , ** credentials ) : for backend , backend_path in _get_backends ( return_tuples = True ) : try : inspect . getcallargs ( backend . authenticate , request , ** credentials ) except TypeError : continue try : user = await backend . authenticate ( request , ** credentials ) except PermissionDenied : break if user is None : continue user . backend = backend_path return user
short_docstring: If the given credentials are valid, return a User object.
short_docstring_tokens: If the given credentials are valid return a User object .
comment: """
      If the given credentials are valid, return a User object.
      """$SEP$# This backend doesn't accept these credentials as arguments. Try the next one.$SEP$# This backend says to stop in our tracks - this user should not be allowed in at all.$SEP$# Annotate the user object with the path of the backend.