docs: def check_auth(username, password):
      """
      This function is used to check `username` and `password` in case that
      :attr:`.settings.PRIVATE_INDEX` is set to ``True`` (default is ``False``).
      """
      return (username == settings.PRIVATE_INDEX_USERNAME and
              settings.PRIVATE_INDEX_PASSWORD and
              password == settings.PRIVATE_INDEX_PASSWORD)