code: def test_bayes_risk_ctc(ctc_args):
      # Skip the test if K2 is not installed
      try:
          import k2
      except ImportError:
          return
  
      builtin_ctc = CTC(
          encoder_output_size=10, odim=5, ctc_type="builtin"
      )
      bayes_risk_ctc = CTC(
          encoder_output_size=10, odim=5, ctc_type="brctc"
      )
      bayes_risk_ctc.ctc_lo = builtin_ctc.ctc_lo
  
      builtin_ctc_loss = builtin_ctc(*ctc_args)
      bayes_risk_ctc_loss = bayes_risk_ctc(*ctc_args)
  
      assert torch.abs(builtin_ctc_loss - bayes_risk_ctc_loss) < 1e-6
  
file_path: espnet/test/espnet2/asr/test_ctc.py
imports: import pytest
  import torch
  from espnet2.asr.ctc import CTC
label_desc: Use image node_id 6 for calling a global function with example usage: test_bayes_risk_ctc(ctc_args) without return types