code: def testSoftPlacedShapeTensor(self):
      with ops.device("GPU:0"):
          t = constant_op.constant([[1, 2], [3, 4]])
          a = math_ops.add(
              array_ops.shape(t),
              constant_op.constant([10, 20], dtype=dtypes.int32),
          )
      # Shape computations remain on CPU
      self.assertIn("CPU:0", a.backing_device)
  
imports: from absl.testing import parameterized
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import remote
  from tensorflow.python.eager import test
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
label_desc: Use image node_id 10 for calling the SoftDevicePlacementTest obj's underlying member method code with example usage: obj.testSoftPlacedShapeTensor() without return types