code: def _get_required_cuda_devices_from_device_name(device_name):
      # Returns the number of required CUDA devices to run a test, given a
      # device name. If the device is non-CUDA device, 0 is returned.
      s = device_name.split(":")
      assert len(s) == 2
      if s[0] != "cuda":
          return 0
      return int(s[1]) + 1
  
imports: import pytest
  import chainerx.testing
  from chainerx_tests import cuda_utils
label_desc: Use image node_id 8 for calling a global function with example usage: _get_required_cuda_devices_from_device_name(device_name) and returns: unknown, int