def _build_vrt_file(raster_paths: Iterable[str | Path]) -> Path:
    """
    Build a virtual raster file compositing multiple individual raster files.

    See also https://gdal.org/en/stable/drivers/raster/vrt.html

    Parameters
    ----------
    raster_paths
        The paths to the raster files.

    Returns
    -------
    vrt_path
        The path to the VRT file.
    """
    if build_vrt is None:  # pragma: no cover
        msg = "rio-vrt must be installed as an optional dependency to build VRTs."
        raise ImportError(msg)

    # determine VRT cache filepath, from stringified sorted raster filepaths
    raster_paths = sorted(raster_paths)
    vrt_path = _http._resolve_cache_filepath(str(raster_paths), "vrt")

    # build the VRT file if it doesn't already exist in the cache
    if not vrt_path.is_file():
        msg = f"Building VRT for {len(raster_paths):,} rasters at {str(vrt_path)!r}..."
        utils.log(msg, level=lg.INFO)
        vrt_path.parent.mkdir(parents=True, exist_ok=True)
        build_vrt(vrt_path, raster_paths)

    return vrt_path

    Build a virtual raster file compositing multiple individual raster files.

    See also https://gdal.org/en/stable/drivers/raster/vrt.html

    Parameters
    ----------
    raster_paths
        The paths to the raster files.

    Returns
    -------
    vrt_path
        The path to the VRT file.
    
osmnx/elevation.py