code: def test_eq(device_instance1, device_instance2):
      if device_instance1 == device_instance2:
          return
  
      device1 = device_instance1
      device2 = device_instance2
  
      device1_1 = device1.backend.get_device(device1.index)
      device1_2 = device1.backend.get_device(device1.index)
      device2_1 = device2.backend.get_device(device2.index)
  
      assert device1_1 == device1_2
      assert device1_1 != device2_1
      assert not (device1_1 != device1_2)
      assert not (device1_1 == device2_1)
  
file_path: chainer/tests/chainerx_tests/unit_tests/test_device.py
imports: import copy
  import pickle
  import pytest
  import chainerx
label_desc: Use image node_id 10 for calling a global function with example usage: test_eq(device_instance1, device_instance2) without return types