from pathlib import Path
from typing import Dict
import json


def make_temporary_features_json(
    make_temporary_folders_and_files: Path,
    test_input_json: Dict,
    test_input_json_filename: str,
) -> Path:
    """Make a temporary features JSON file."""

    # Define the list of folders and filenames for possible removal

    # Define the file path for the temporary features JSON file, then write its contents
    temp_json_path = make_temporary_folders_and_files.joinpath(test_input_json_filename)
    temp_json_path.touch()
    with open(temp_json_path, "w", encoding="utf-8") as f:
        json.dump(test_input_json, f)
    return temp_json_path