def create_temp_dir(tmp_path, subdir_name, dir_filenames):
    """fixture to create temporary directory containing a subdir and files.

    Args:
        tmp_path (path obj): pytest fixture for temporary paths
        subdir_name (str): fixture providing subdir name as string
        dir_filenames ([str]): fixture providing list of strings with filenames

    Returns:
        tmp_dir (path obj): pointing to the temporary directory as created by
                            this fixture
    """
    # make sub directory in tmp for files
    tmp_dir = tmp_path / subdir_name
    tmp_dir.mkdir()
    # create temporary files
    for fn in dir_filenames:
        fn_path = tmp_dir / fn
        fn_path.touch()

    return tmp_dir