code: def test_seq_copy(
      train_params: str,
      translate_params: str,
      use_prepared_data: bool,
      n_source_factors: int,
      n_target_factors: int,
  ):
      """
      Task: copy short sequences of digits
      """
      source_text_prefix_token = (
          _EOP_TAG if "--end-of-prepending-tag" in train_params else ""
      )
      with tmp_digits_dataset(
          prefix="test_seq_copy",
          train_line_count=_TRAIN_LINE_COUNT,
          train_line_count_empty=_TRAIN_LINE_COUNT_EMPTY,
          train_max_length=_LINE_MAX_LENGTH,
          dev_line_count=_DEV_LINE_COUNT,
          dev_max_length=_LINE_MAX_LENGTH,
          test_line_count=_TEST_LINE_COUNT,
          test_line_count_empty=_TEST_LINE_COUNT_EMPTY,
          test_max_length=_TEST_MAX_LENGTH,
          sort_target=False,
          with_n_source_factors=n_source_factors,
          with_n_target_factors=n_target_factors,
          source_text_prefix_token=source_text_prefix_token,
      ) as data:
          # TODO: Here we temporarily switch off comparing translation and scoring scores, which
          # sometimes produces inconsistent results for --batch-size > 1 (see issue #639 on github).
          check_train_translate(
              train_params=train_params,
              translate_params=translate_params,
              data=data,
              use_prepared_data=use_prepared_data,
              max_seq_len=_LINE_MAX_LENGTH,
              compare_output=False,
          )
  
imports: import logging
  import os
  import platform
  import sys
  from tempfile import TemporaryDirectory
  from typing import List
  from unittest.mock import patch
  import pytest
  import torch
  import sockeye.average
  import sockeye.checkpoint_decoder
  import sockeye.evaluate
  from sockeye import constants
  from sockeye.config import Config
  from sockeye.model import load_model
  from sockeye.test_utils import run_train_translate, tmp_digits_dataset
  from test.common import check_train_translate
label_desc: Use image node_id 1 for calling a global function with example usage: test_seq_copy(train_params, translate_params, use_prepared_data, n_source_factors, n_target_factors) without return types