def get_credentials(username: str = None, **kwargs) -> dict:
credentials = {settings.AXES_USERNAME_FORM_FIELD: username}<EOL>credentials.update(kwargs)<EOL>return credentials<EOL>
Calculate credentials for Axes to use internally from given username and kwargs.

Axes will set the username value into the key defined with ``settings.AXES_USERNAME_FORM_FIELD``
and update the credentials dictionary with the kwargs given on top of that.