code: def test_attribute_mixing_matrix_float(self):
      mapping = {0.5: 1, 1.5: 0}
      a_result = np.array([[6.0, 1.0], [1.0, 0.0]])
      a = nx.attribute_mixing_matrix(
          self.F, "margin", mapping=mapping, normalized=False
      )
      np.testing.assert_equal(a, a_result)
      a = nx.attribute_mixing_matrix(self.F, "margin", mapping=mapping)
      np.testing.assert_equal(a, a_result / a_result.sum())
  
imports: import pytest
  import networkx
  from .base_test import BaseTestAttributeMixing, BaseTestDegreeMixing
label_desc: Use image node_id 5 for calling the TestAttributeMixingMatrix obj's underlying member method code with example usage: obj.test_attribute_mixing_matrix_float() without return types