def METHOD_NAME(self, text: str, *, default: str) -> str:
    """Get an alias from the config.
    Args:
        text: The text to parse.
        aliases: A map of aliases to commands.
        default : Default value to return when alias was not found.
    Return:
        The new command string if an alias was found. Default value
        otherwise.
    """
    parts = text.strip().split(maxsplit=1)
    aliases = config.cache['aliases']
    if parts[0] not in aliases:
        return default
    alias = aliases[parts[0]]
    try:
        new_cmd = '{} {}'.format(alias, parts[1])
    except IndexError:
        new_cmd = alias
    if text.endswith(' '):
        new_cmd += ' '
    return new_cmd