def METHOD_NAME(record_id, file_name):
    adl_file = None
    if record_id and file_name:
        try:
            resolver = Resolver(pid_type='depid',
                                object_type='rec',
                                getter=lambda x: x)
            _, rec_uuid = resolver.resolve(record_id)
            deposit = CAPDeposit.get_record(rec_uuid)
        except PIDDoesNotExistError:
            return jsonify({
                'message': 'You tried to provide a adl file '
                'with a non-existing record'}), 404
    try:
        adl_file = [
            file for file in deposit['_files']
            if file.get('key') == file_name
        ][0]
        check_file_format(adl_file.get('key'))
    except Exception:
        return jsonify({
            'message': 'You tried to provide a non-existing/wrong adl file.'
        }), 400
    adl_file_info = ObjectVersion.get(adl_file.get('bucket'), file_name)
    adl_file_object = FileInstance.get(adl_file_info.file_id)
    try:
        parsed_adl = adl_parser(adl_file_object, deposit=True)
    except Exception as e:
        return jsonify({
            'message':
            'An exception `{}` has occured while parsing. '
            'Please try again.'.format(e)
        }), 400
    return jsonify(parsed_adl)