def METHOD_NAME(
    filename_src: PathLikeOrStr,
    output_filename_template: str,
    overview_list: Sequence[int],
    overview_alg="bilinear",
    create_file_per_ovr: bool = True,
    driver_name: str = "GTiff",
):
    files_list = []
    ds_with_ovrs = output_filename_template.format("")
    shutil.copy(filename_src, ds_with_ovrs)
    files_list.append(ds_with_ovrs)
    ds_base = output_filename_template.format(0)
    shutil.copy(filename_src, ds_base)
    files_list.append(ds_base)
    ds = open_ds(ds_with_ovrs, access_mode=gdal.OF_UPDATE | gdal.OF_RASTER)
    size = (ds.RasterXSize, ds.RasterYSize)
    ds.BuildOverviews(overview_alg, overviewlist=overview_list)
    driver = gdal.GetDriverByName(driver_name)
    all_ovrs = [1]
    all_ovrs.extend(overview_list)
    for ovr_idx, f in enumerate(all_ovrs):
        filename_i = output_filename_template.format(ovr_idx)
        if ovr_idx == 0:
            ds1 = open_ds(filename_i)
        else:
            ds1 = open_ds(ds_with_ovrs, ovr_idx=ovr_idx, ovr_only=True)
            if create_file_per_ovr:
                driver.CreateCopy(filename_i, ds1)
                files_list.append(filename_i)
        assert (
            ds1.RasterXSize == int(size[0] / f)
            and ds1.RasterYSize == int(size[1] / f)
            and ds1.RasterCount == 1
        )
    return all_ovrs, files_list