from typing import Optional


def injection_file_name(
    science_case: str, num_injs_per_redshift_bin: int, task_id: Optional[int] = None
) -> str:
    """Returns the file name for the raw injection data without path.

    Args:
        science_case: Science case.
        num_injs_per_redshift_bin: Number of injections per redshift major bin.
        task_id: Task ID.
    """
    file_name = f"injections_SCI-CASE_{science_case}_INJS-PER-ZBIN_{num_injs_per_redshift_bin}.npy"
    if task_id is not None:
        file_name = file_name.replace(".npy", f"_TASK_{task_id}.npy")
    return file_name