code: def _stack_with_weights(
      datasets: Sequence[xr.DataArray],
      weights: Sequence[xr.DataArray],
      combine_times: bool,
      blend_type: str,
  ) -> xr.DataArray:
      blend_func = _get_weighted_blending_func(blend_type)
      filled_weights = list(
          _fill_weights_for_invalid_dataset_pixels(datasets, weights)
      )
      return blend_func(datasets, filled_weights, combine_times)
  
file_path: satpy/satpy/multiscene/_blend_funcs.py
imports: from __future__ import annotations
  from datetime import datetime
  from typing import Callable, Iterable, Mapping, Optional, Sequence
  import pandas
  import xarray
  from dask import array
  from satpy.dataset import combine_metadata
label_desc: Use image node_id 2 for calling a global function with example usage: _stack_with_weights(datasets, weights, combine_times, blend_type) and returns: blend_func