code: def make_test_image_filenames(name, test_file):
      """
      Create filenames for testing
  
      Parameters
      ----------
      name : str
          An identifier for the specific test. This will make-up
          part of the filenames.
      test_file : str
          Full path of the test file. This will determine the
          directory structure
  
      Returns
      -------
      out : types.SimpleNamespace
          Object with 3 attributes to store the generated filenames
  
              - result
              - baseline
              - expected
  
          `result`, is the filename for the image generated by the test.
          `baseline`, is the filename for the baseline image to which
          the result will be compared.
          `expected`, is the filename to the copy of the baseline that
          will be stored in the same directory as the result image.
          Creating a copy make comparison easier.
      """
      name = Path(name).with_suffix(".png")
      expected_name = f"{name.stem}-expected{name.suffix}"
      subdir = Path(test_file).stem
      filenames = types.SimpleNamespace(
          baseline=baseline_images_dir / subdir / name,
          result=result_images_dir / subdir / name,
          expected=result_images_dir / subdir / expected_name,
      )
      filenames.result.parent.mkdir(parents=True, exist_ok=True)
      return filenames
  
imports: import inspect
  import locale
  import shutil
  import types
  import warnings
  from copy import deepcopy
  from pathlib import Path
  import matplotlib
  import matplotlib.pyplot
  from matplotlib.testing.compare import compare_images
  from plotnine import ggplot, theme
label_desc: Use image node_id 6 for calling a global function with example usage: make_test_image_filenames(name, test_file) and returns: filenames