from typing import List
from pathlib import Path
import random


def randomly_choose_files(target_dir: str, num_files: int) -> List[Path]:
    """Return a list of randomly chosen files in the target_dir.

    Args:
        target_dir (str): Directory to search for files.
        num_files (int): Number of files to return.

    Returns:
        List[Path]: List of randomly chosen files.
    """
    target = Path(target_dir)
    file_list = list(target.glob("*"))
    return [
        file_list[i]
        for i in sorted(list(range(len(file_list))), key=lambda x: random.random())[
            :num_files
        ]
    ]