def submit_rsg(config_path, output_path, download):
    """Creates submission file for the Russian SuperGLUE tasks.

    Args:
        config_path: Path to the model configuration file.
        output_path: Path to output file. If None, file name is selected according corresponding task name.
        download: If True, the model will be downloaded from the DeepPavlov server.
    """

    model, data_gen, task_name = split_config(config_path, download)
    submission = []

    if task_name == 'rucos':
        submission = commonsense_reasoning_prediction(model, data_gen)

    elif task_name == 'parus':
        for idx, (x, _) in enumerate(tqdm(data_gen)):
            prediction = model.compute(x)[0]
            label = int(prediction == 'choice2')
            submission.append({'idx': idx, 'label': label})

    elif task_name == 'muserc':
        submission = multi_sentence_comprehension_prediction(model, data_gen)

    elif task_name in RSG_TASKS:
        for idx, (x, _) in enumerate(tqdm(data_gen)):
            prediction = model.compute(x)

            while isinstance(prediction, list):
                prediction = prediction[0]

            submission.append({'idx': idx, 'label': prediction})
    else:
        raise ValueError(f'Unexpected Russian SuperGLUE task name: {task_name}')

    save_path = output_path if output_path is not None else f'{RSG_TASKS[task_name]}.jsonl'
    save_path = expand_path(save_path)
    save_path.parent.mkdir(parents=True, exist_ok=True)
    save_jsonl(submission, save_path)
    log.info(f'Prediction saved to {save_path}')
Creates submission file for the Russian SuperGLUE tasks.

    Args:
        config_path: Path to the model configuration file.
        output_path: Path to output file. If None, file name is selected according corresponding task name.
        download: If True, the model will be downloaded from the DeepPavlov server.
    
deeppavlov/utils/benchmarks/benchmarks.py