code: def test_method_choice(mocker, op, exp_method, dev_wires):
      """Test that the right method between _apply_channel and _apply_channel_tensordot
      is chosen."""
  
      methods = ["_apply_channel", "_apply_channel_tensordot"]
      del methods[methods.index(exp_method)]
      unexp_method = methods[0]
      spy_exp = mocker.spy(DefaultMixed, exp_method)
      spy_unexp = mocker.spy(DefaultMixed, unexp_method)
      dev = qml.device("default.mixed", wires=dev_wires)
      dev._apply_operation(op)
  
      spy_unexp.assert_not_called()
      spy_exp.assert_called_once()
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
  from pennylane import DeviceError
label_desc: Use image node_id 2 for calling a global function with example usage: test_method_choice(mocker, op, exp_method, dev_wires) without return types