def get_output_mode(output, mode):
    """
    From the output name and the mode returns a the function that will transform the intermediary
    representation to the output.
    """
    if mode != 'auto':
        try:
            return switch_output_mode_auto[mode]
        except __HOLE__:
            raise ValueError('Mode "{}" is not supported.')

    extension = output.split('.')[-1]
    try:
        return switch_output_mode[extension]
    except KeyError:
        return intermediary_to_schema
dataset/ETHPy150Open Alexis-benoist/eralchemy/eralchemy/main.py/get_output_mode