code: def test_rank_from_shape_scalar(self):
      self.assertEqual(1, ps.rank_from_shape(5))
      v = tf.Variable(4, shape=tf.TensorShape(None))
      self.evaluate(v.initializer)
      self.assertEqual(1, self.evaluate(ps.rank_from_shape(v)))
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling the ShapeTest obj's underlying member method code with example usage: obj.test_rank_from_shape_scalar() without return types