code: def test_custom_device_op(self):
      # Test both of the custom functions and check that the devicetype is
      # correctly applied
      def set_cuda(x):
          return x.cuda()
  
      def set_cpu(x):
          return x.cpu()
  
      def set_mkldnn(x):
          return x.to_mkldnn()
  
      device_pairs = (
          (set_cuda, self.cuda),
          (set_cpu, self.cpu),
          (set_mkldnn, self.mkldnn),
      )
  
      for fn, out_device in device_pairs:
          for in_device in self.device_types:
              self.assert_device_equal(fn, [in_device], out_device)
  
imports: from itertools import product
  import unittest
  import torch
  from torch.testing._internal.common_utils import TEST_CUDA
  from torch.testing._internal.jit_utils import JitTestCase
  from torch.jit._passes._property_propagation import apply_input_props_using_example
label_desc: Use image node_id 15 for calling the TestDeviceAnalysis obj's underlying member method code with example usage: obj.test_custom_device_op() and returns: x, x, x