docstr: Side effect ops are added with the same device of the subscribed op.
docstr_tok: ["Side","effect","ops","are","added","with","the","same","device","of","the","subscribed","op","."]
code: def test_subscribe_tensors_on_different_devices(self):
      """Side effect ops are added with the same device of the subscribed op."""
      c1 = constant_op.constant(10)
      c2 = constant_op.constant(20)
  
      with ops.device("cpu:0"):
          add = math_ops.add(c1, c2)
  
      with ops.device("cpu:1"):
          mul = math_ops.multiply(c1, c2)
  
      def sub(t):
          return t
  
      add_sub = subscribe.subscribe(
          add, lambda t: script_ops.py_func(sub, [t], [t.dtype])
      )
  
      mul_sub = subscribe.subscribe(
          mul, lambda t: script_ops.py_func(sub, [t], [t.dtype])
      )
  
      # Expect the identity tensors injected by subscribe to have been created
      # on the same device as their original tensors.
      self.assertNotEqual(add_sub.device, mul_sub.device)
      self.assertEqual(add.device, add_sub.device)
      self.assertEqual(mul.device, mul_sub.device)
  
imports: import collections
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import subscribe
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 10 for calling the SubscribeTest obj's underlying member method code with example usage: obj.test_subscribe_tensors_on_different_devices() and returns: t