code: def test_degree_mixing_dict_weighted(self):
      d = nx.degree_mixing_dict(self.W, weight="weight")
      d_result = {0.5: {1.5: 1}, 1.5: {1.5: 6, 0.5: 1}}
      assert d == d_result
  
imports: import pytest
  import networkx
  from .base_test import BaseTestAttributeMixing, BaseTestDegreeMixing
label_desc: Use image node_id 5 for calling the TestDegreeMixingDict obj's underlying member method code with example usage: obj.test_degree_mixing_dict_weighted() without return types