code: def test_unitary_cost(
      n, rank_r, rank_m, rank_max, br, alpha, beta, cost_ref
  ):
      r"""Test that unitary_cost returns the correct value."""
      cost = qml.resource.DoubleFactorization.unitary_cost(
          n, rank_r, rank_m, rank_max, br, alpha, beta
      )
  
      assert cost == cost_ref
  
file_path: pennylane/tests/resource/test_second_quantization.py
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: test_unitary_cost(n, rank_r, rank_m, rank_max, br, alpha, beta, cost_ref) without return types