code: def testPadShapeRightWithOnesCanBeGraphNoop(self):
      # First ensure graph actually *is* changed when we use non-trivial ndims.
      # Use an explicitly created graph, to make sure no whacky test fixture graph
      # reuse is going on in the background.
      g = tf.Graph()
      with g.as_default():
          x = tf.constant(np.ones([3], np.float32))
          graph_def = g.as_graph_def()
          x = util.pad_shape_with_ones(x, 3)
          self.assertNotEqual(graph_def, g.as_graph_def())
  
      # Now verify that graphdef is unchanged (no extra ops) when we pass ndims=0.
      g = tf.Graph()
      with g.as_default():
          x = tf.constant(np.ones([3], np.float32))
          graph_def = g.as_graph_def()
          x = util.pad_shape_with_ones(x, 0)
          self.assertEqual(graph_def, g.as_graph_def())
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.gradient import value_and_gradient
  from tensorflow_probability.python.math.psd_kernels.internal import util
label_desc: Use image node_id 5 for calling the UtilTest obj's underlying member method code with example usage: obj.testPadShapeRightWithOnesCanBeGraphNoop() without return types