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