def METHOD_NAME(
    hostname,
    port: int = 1433,
    database: str = "MOSAIQ",
    user_input: Callable = input,
    password_input: Callable = getpass,
    output: Callable = print,
    alias: Optional[str] = None,
):
    """Get the username and password from the keyring storage.
    This will fallback to prompting the user for a username and password
    if one is not found. These credentials will then be subsequently
    stored.
    Parameters
    ----------
    hostname : str
        The MSSQL server hostname
    port : int, optional
        The MSSQL server port, by default 1433
    database : str, optional
        The MSSQL database name, by default "MOSAIQ"
    user_input : Callable, optional
        A function by which to get an plain text input from the user,
        by default ``input``
    password_input : Callable, optional
        A function by which to get an password input from the user,
        by default ``getpass``
    output : Callable, optional
        A function by which to give feedback to the user, by default
        ``print``
    alias : Optional[str], optional
        A human readable representation of the server, this is the name
        of the server presented to the user should their not be
        credentials already on the machine, by default "hostname:port/database"
    Returns
    -------
    username, password
    Raises
    ------
    ValueError
        When a blank username is provided.
    """
    if alias is None:
        alias = get_keyring_storage_name(
            hostname=hostname, port=port, database=database
        )
    username, password = get_username_and_password_without_prompt_fallback(
        hostname=hostname, port=port, database=database
    )
    if username is None or username == "":
        output(f"Provide a user that only has `db_datareader` access to '{alias}'")
        username = user_input()
        if username == "":
            error_message = "Username should not be blank."
            output(error_message)
            raise ValueError(error_message)
        save_username(username, hostname=hostname, port=port, database=database)
    if password is None:
        output(f"Provide the password for the '{username}' user on '{alias}'")
        password = password_input()
        save_password(password, hostname=hostname, port=port, database=database)
    return username, password