






def create_bioregion_mosaic(sitecode_epsg_list, year, environment, archive_config,
                            mosaic_output_path, ):
    raster_list = []
    
    for sitecode, site_epsg in sitecode_epsg_list:
        sitecode = sitecode.split("-")[0]



        class_year_relative_path = Path(
            f"{previous_year}/{sitecode}/LULC/{previous_year_environment}/"
            f"MASTER_LULC_{bioregion}_{previous_year}_{previous_year_environment}_{sitecode}_OPTSAR_CLASS_ORIG.tif"
        )
        class_year_path = find_file_in_archives(
            class_year_relative_path, archive_config, error_on_missing=True
        )
        
        raster_list.append(class_year_path)

        create_mosaic_filepath(master_lc_list, master_lc_mosaic, 0, "mode", "Int16",
                               target_extent, "EPSG:4326", target_pixel_size=pixel_prev_width, use_multi=True,
                               num_threads="8")