code: def test_df_factorization(
      one, two, n, factors, eigvals, eigvecs, rank_r, rank_m, rank_max
  ):
      r"""Test that DoubleFactorization class returns correct factorization values."""
      est = qml.resource.DoubleFactorization(
          one, two, chemist_notation=True
      )
  
      assert np.allclose(est.n, n)
      assert np.allclose(est.factors, factors)
      assert np.allclose(np.array(est.eigvals), np.array(eigvals))
      assert np.allclose(np.array(est.eigvecs), np.array(eigvecs))
      assert np.allclose(est.rank_r, rank_r)
      assert np.allclose(est.rank_m, rank_m)
      assert np.allclose(est.rank_max, rank_max)
  
file_path: pennylane/tests/resource/test_second_quantization.py
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: test_df_factorization(one, two, n, factors, eigvals, eigvecs, rank_r, rank_m, rank_max) without return types