code: def test_weighted_aggregation_drift_with_model(
      drifted_data_and_model,
  ):
      # Arrange
      train, test, model = drifted_data_and_model
      check = FeatureDrift(
          categorical_drift_method="PSI",
          numerical_drift_method="EMD",
          aggregation_method="weighted",
      )
  
      # Act
      aggregated_result = check.run(train, test, model).reduce_output()
      # Assert
      assert_that(
          aggregated_result.keys(), has_item("Weighted Drift Score")
      )
      assert_that(
          aggregated_result["Weighted Drift Score"],
          close_to(0.1195, 0.01),
      )
  
imports: import numpy
  import pandas
  from hamcrest import assert_that, calling, close_to, equal_to, greater_than, has_entries, has_item, has_length, is_not, raises
  from deepchecks.core.errors import NotEnoughSamplesError
  from deepchecks.tabular.checks import FeatureDrift
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 9 for calling a global function with example usage: test_weighted_aggregation_drift_with_model(drifted_data_and_model) without return types