class_docstr: Test individual functions used for blending.
class_docstr_tok: ["Test","individual","functions","used","for","blending","."]
docstr: Test the 'stack_weighted' function.
docstr_tok: ["Test","the","'stack_weighted","'","function","."]
code: def test_blend_function_stack_weighted(
      self, datasets_and_weights, line, column
  ):
      """Test the 'stack_weighted' function."""
      from functools import partial
  
      from satpy.dataset import combine_metadata
  
      input_data = datasets_and_weights
  
      input_data["weights"][1][line, :] = 2
      input_data["weights"][2][:, column] = 2
  
      stack_with_weights = partial(
          stack, weights=input_data["weights"], combine_times=False
      )
      blend_result = stack_with_weights(input_data["datasets"][0:3])
  
      ds1 = input_data["datasets"][0]
      ds2 = input_data["datasets"][1]
      ds3 = input_data["datasets"][2]
      expected = ds1.copy()
      expected[:, column] = ds3[:, column]
      expected[line, :] = ds2[line, :]
      expected.attrs = combine_metadata(
          *[x.attrs for x in input_data["datasets"][0:3]]
      )
  
      xr.testing.assert_equal(
          blend_result.compute(), expected.compute()
      )
      assert expected.attrs == blend_result.attrs
  
imports: from datetime import datetime
  import dask.array
  import numpy
  import pytest
  import xarray
  from pyresample.geometry import AreaDefinition
  from satpy import DataQuery, Scene
  from satpy.multiscene import stack, timeseries
  from satpy.tests.multiscene_tests.test_utils import DEFAULT_SHAPE, _create_test_area, _create_test_dataset, _create_test_int8_dataset
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 5 for calling the TestBlendFuncs obj's underlying member method code with example usage: obj.test_blend_function_stack_weighted(datasets_and_weights, line, column) without return types