code: def reproduce(
      model: str,
      reference: str,
      dataset: str,
      replicates: int,
      directory: str,
      move_to_cpu: bool,
      discard_replicates: bool,
      extra_config: Optional[pathlib.Path],
      keep_seed: bool,
  ):
      """Reproduce a pre-defined experiment included in PyKEEN.
  
      Example: $ pykeen experiments reproduce tucker balazevic2019 fb15k
  
      # noqa:DAR101
      # noqa:DAR401
      """
      file_name = f"{reference}_{model}_{dataset}"
      path = HERE.joinpath(model, file_name)
      paths = {
          full_path
          for full_path in map(
              path.with_suffix, CONFIGURATION_FILE_FORMATS
          )
          if full_path.is_file()
      }
      if len(paths) == 0:
          raise FileNotFoundError(
              "Could not find a configuration file."
          )
      elif len(paths) > 1:
          raise ValueError(
              f"Found multiple configuration files: {paths}"
          )
      path = next(iter(paths))
      _help_reproduce(
          directory=directory,
          path=path,
          replicates=replicates,
          move_to_cpu=move_to_cpu,
          save_replicates=not discard_replicates,
          file_name=file_name,
          extra_config=extra_config,
          keep_seed=keep_seed,
      )
  
imports: import logging
  import os
  import pathlib
  import shutil
  import sys
  import time
  from typing import Iterable, Optional, Union
  from uuid import uuid4
  import click
  import tabulate
  from more_click import verbose_option
  from tqdm.auto import tqdm
  from pykeen.utils import CONFIGURATION_FILE_FORMATS, load_configuration, normalize_path
label_desc: Use image node_id 3 for calling a global function with example usage: reproduce(model, reference, dataset, replicates, directory, move_to_cpu, discard_replicates, extra_config, keep_seed) without return types