code: def test_reproducible_cli_runs(
      backend: str,
      type_of_run: str,
      random_seed: int,
      second_seed_offset: int,
      csv_filename: str,
      tmpdir: pathlib.Path,
  ) -> None:
      """
      Test for reproducible training using `ludwig experiment|train --dataset`.
      Args:
          backend (str): backend to use
          type_of_run(str): type of run, either train or experiment
          csv_filename(str): file path of dataset to use
          random_seed(int): random seed integer to use for test
          second_seed_offset(int): zero to use same random seed for second test, non-zero to use a different
              seed for the second run.
          tmpdir (pathlib.Path): temporary directory path
  
      Returns: None
      """
      config_filename = os.path.join(tmpdir, "config.yaml")
      dataset_filename = _prepare_data(csv_filename, config_filename)
  
      if backend == "local":
          command_to_run = _run_ludwig
      else:
          command_to_run = _run_ludwig_horovod
  
      # run first model
      command_to_run(
          type_of_run,
          dataset=dataset_filename,
          config=config_filename,
          output_directory=str(tmpdir),
          skip_save_processed_input="",  # skip saving preprocessed inputs for reproducibility
          experiment_name="reproducible",
          model_name="run1",
          random_seed=str(random_seed),
      )
  
      # run second model with same seed
      command_to_run(
          type_of_run,
          dataset=dataset_filename,
          config=config_filename,
          output_directory=str(tmpdir),
          skip_save_processed_input="",  # skip saving preprocessed inputs for reproducibility
          experiment_name="reproducible",
          model_name="run2",
          random_seed=str(random_seed + second_seed_offset),
      )
  
      # retrieve training statistics and compare
      with open(
          os.path.join(
              tmpdir, "reproducible_run1", "training_statistics.json"
          )
      ) as f:
          training1 = json.load(f)
      with open(
          os.path.join(
              tmpdir, "reproducible_run2", "training_statistics.json"
          )
      ) as f:
          training2 = json.load(f)
  
      if second_seed_offset == 0:
          # same seeds should result in same output
          assert training1 == training2
      else:
          # non-zero second_seed_offset uses different seeds and should result in different output
          assert training1 != training2
  
      # if type_of_run is experiment check test statistics and compare
      if type_of_run == "experiment":
          with open(
              os.path.join(
                  tmpdir, "reproducible_run1", "test_statistics.json"
              )
          ) as f:
              test1 = json.load(f)
          with open(
              os.path.join(
                  tmpdir, "reproducible_run2", "test_statistics.json"
              )
          ) as f:
              test2 = json.load(f)
  
          if second_seed_offset == 0:
              # same seeds should result in same output
              assert test1 == test2
          else:
              # non-zero second_seed_offset uses different seeds and should result in different output
              assert test1 != test2
  
imports: import json
  import os
  import os.path
  import pathlib
  import shutil
  import subprocess
  from typing import List, Set
  import pytest
  import yaml
  from ludwig.constants import BATCH_SIZE, COMBINER, EVAL_BATCH_SIZE, INPUT_FEATURES, NAME, OUTPUT_FEATURES, PREPROCESSING, TRAINER
  from ludwig.types import FeatureConfigDict
  from ludwig.utils.data_utils import load_yaml
  from tests.integration_tests.utils import category_feature, generate_data, number_feature, sequence_feature
label_desc: Use image node_id 20 for calling a global function with example usage: test_reproducible_cli_runs(backend, type_of_run, random_seed, second_seed_offset, csv_filename, tmpdir) without return types