def METHOD_NAME(args):
    if args.src_seq_length > args.max_position_embeddings:
        args.max_position_embeddings = args.src_seq_length
    if args.task.lower() in [
            'cnn_dm', 'cnn_dm_original', 'gigaword', 'blank',
            'squad_generation', 'xsum', 'extraction'
    ]:
        finetune(
            args,
            train_valid_datasets_provider, {},
            end_of_epoch_callback_provider=metrics_func_provider,
            forward_step=seq2seq_forward_step)
    else:
        raise NotImplementedError(args.task)