def adata_parameterized(request):
    return gen_adata(shape=(200, 300), X_type=request.param)
def find_target_files(top_target_dir_name, radar_file_name_matrix,
                      target_names):
    """Locates files with target values (storm-hazard indicators).

    D = number of SPC dates in time period

    :param top_target_dir_name: Name of top-level directory.  Files therein
        will be found by `target_val_utils.find_target_file`.
    :param radar_file_name_matrix: numpy array created by either
        `find_storm_images_2d` or `find_storm_images_3d`.  Length of the first
        axis is D.
    :param target_names: See doc for `_check_target_vars`.
    :return: target_file_names: length-D list of file paths.
    """

    error_checking.assert_is_numpy_array(radar_file_name_matrix)
    num_file_dimensions = len(radar_file_name_matrix.shape)
    error_checking.assert_is_geq(num_file_dimensions, 2)
    error_checking.assert_is_leq(num_file_dimensions, 3)

    event_type_string = _check_target_vars(target_names)[-1]

    num_file_times = radar_file_name_matrix.shape[0]
    target_file_names = [''] * num_file_times

    for i in range(num_file_times):
        if num_file_dimensions == 2:
            this_file_name = radar_file_name_matrix[i, 0]
        else:
            this_file_name = radar_file_name_matrix[i, 0, 0]

        _, this_spc_date_string = storm_images.image_file_name_to_time(
            this_file_name)

        target_file_names[i] = target_val_utils.find_target_file(
            top_directory_name=top_target_dir_name,
            event_type_string=event_type_string,
            spc_date_string=this_spc_date_string, raise_error_if_missing=False)

        if os.path.isfile(target_file_names[i]):
            continue

        target_file_names[i] = None

    return target_file_names