code: def module_to_test_file(module_fname):
      """
      Returns the name of the file(s) where `module_fname` is tested.
      """
      splits = module_fname.split(os.path.sep)
  
      # Special map has priority
      short_name = os.path.sep.join(splits[2:])
      if short_name in SPECIAL_MODULE_TO_TEST_MAP:
          test_file = SPECIAL_MODULE_TO_TEST_MAP[short_name]
          if isinstance(test_file, str):
              return f"tests/{test_file}"
          return [f"tests/{f}" for f in test_file]
  
      module_name = splits[-1]
      # Fast tokenizers are tested in the same file as the slow ones.
      if module_name.endswith("_fast.py"):
          module_name = module_name.replace("_fast.py", ".py")
  
      # Special case for pipelines submodules
      if len(splits) >= 2 and splits[-2] == "pipelines":
          default_test_file = (
              f"tests/pipelines/test_pipelines_{module_name}"
          )
      # Special case for benchmarks submodules
      elif len(splits) >= 2 and splits[-2] == "benchmark":
          return [
              "tests/benchmark/test_benchmark.py",
              "tests/benchmark/test_benchmark_tf.py",
          ]
      # Special case for commands submodules
      elif len(splits) >= 2 and splits[-2] == "commands":
          return "tests/utils/test_cli.py"
      # Special case for onnx submodules
      elif len(splits) >= 2 and splits[-2] == "onnx":
          return [
              "tests/onnx/test_features.py",
              "tests/onnx/test_onnx.py",
              "tests/onnx/test_onnx_v2.py",
          ]
      # Special case for utils (not the one in src/transformers, the ones at the root of the repo).
      elif len(splits) > 0 and splits[0] == "utils":
          default_test_file = f"tests/repo_utils/test_{module_name}"
      elif len(splits) > 4 and splits[2] == "models":
          default_test_file = (
              f"tests/models/{splits[3]}/test_{module_name}"
          )
      elif len(splits) > 2 and splits[2].startswith("generation"):
          default_test_file = f"tests/generation/test_{module_name}"
      elif len(splits) > 2 and splits[2].startswith("trainer"):
          default_test_file = f"tests/trainer/test_{module_name}"
      else:
          default_test_file = f"tests/utils/test_{module_name}"
  
      if os.path.isfile(default_test_file):
          return default_test_file
  
      # Processing -> processor
      if "processing" in default_test_file:
          test_file = default_test_file.replace(
              "processing", "processor"
          )
          if os.path.isfile(test_file):
              return test_file
  
imports: import argparse
  import collections
  import json
  import os
  import re
  from contextlib import contextmanager
  from pathlib import Path
  from git import Repo
label_desc: Use image node_id 13 for calling a global function with example usage: module_to_test_file(module_fname) and returns: unknown, default_test_file, str, test_file, list, test_file, str, list