def get_automatic_parser(exim_id, infile):
    """Returns the parser to be used by default for the instrument id interface
    and results file passed in.
    """
    adapter = getExim(exim_id)
    if IInstrumentAutoImportInterface.providedBy(adapter):
        return adapter.get_automatic_parser(infile)

    # TODO Remove this once classic instrument interface migrated
    parser_func = filter(lambda i: i[0] == exim_id, PARSERS)
    parser_func = parser_func and parser_func[0][1] or None
    if not parser_func or not hasattr(adapter, parser_func):
        return None
    parser_func = getattr(adapter, parser_func)
    return parser_func(infile)
Returns the parser to be used by default for the instrument id interface
    and results file passed in.