code: def test_momentum_state_qrom(
      n_p, n_m, n_dirty, n_tof, kappa, ms_cost_ref, beta_ref
  ):
      r"""Test that the _momentum_state_qrom function returns correct values."""
      (
          ms_cost,
          beta,
      ) = qml.resource.FirstQuantization._momentum_state_qrom(
          n_p, n_m, n_dirty, n_tof, kappa
      )
  
      assert ms_cost == ms_cost_ref
      assert beta == beta_ref
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 21 for calling a global function with example usage: test_momentum_state_qrom(n_p, n_m, n_dirty, n_tof, kappa, ms_cost_ref, beta_ref) without return types