code: 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}")
  
file_path: DeepPavlov/deeppavlov/utils/benchmarks/benchmarks.py
imports: import argparse
  from collections import defaultdict
  from logging import getLogger
  import numpy
  from tqdm import tqdm
  from deeppavlov import build_model
  from deeppavlov.core.commands.train import read_data_by_config, get_iterator_from_config
  from deeppavlov.core.commands.utils import parse_config, expand_path
  from deeppavlov.core.common.file import save_jsonl
label_desc: Use image node_id 7 for calling a global function with example usage: submit_rsg(config_path, output_path, download) without return types