code: def testParsingTensorInfoProtoMaps(self):
      with tf.compat.v1.Graph().as_default():
          sig = _make_signature(
              {
                  "x": tf.compat.v1.placeholder(tf.string, [2]),
              },
              {
                  "y": tf.compat.v1.placeholder(tf.int32, [2]),
                  "z": tf.compat.v1.sparse_placeholder(
                      tf.float32, [2, 10]
                  ),
                  "r": tf.compat.v1.ragged.placeholder(
                      tf.float32, 1, ()
                  ),
              },
          )
  
          inputs = tensor_info.parse_tensor_info_map(sig.inputs)
          self.assertEqual(set(inputs.keys()), set(["x"]))
          self.assertEqual(inputs["x"].get_shape(), [2])
          self.assertEqual(inputs["x"].dtype, tf.string)
          self.assertFalse(inputs["x"].is_sparse)
          self.assertFalse(inputs["x"].is_composite)
          self.assertEqual(
              inputs["x"].type_spec, tf.TensorSpec([2], tf.string)
          )
          self.assertTrue(inputs["x"].is_supported_type)
  
          outputs = tensor_info.parse_tensor_info_map(sig.outputs)
          self.assertEqual(set(outputs.keys()), set(["y", "z", "r"]))
          self.assertEqual(outputs["y"].get_shape(), [2])
          self.assertEqual(outputs["y"].dtype, tf.int32)
          self.assertFalse(outputs["y"].is_sparse)
          self.assertFalse(outputs["y"].is_composite)
          self.assertEqual(
              outputs["y"].type_spec, tf.TensorSpec([2], tf.int32)
          )
          self.assertTrue(outputs["y"].is_supported_type)
  
          self.assertEqual(outputs["z"].get_shape(), [2, 10])
          self.assertEqual(outputs["z"].dtype, tf.float32)
          self.assertTrue(outputs["z"].is_sparse)
          self.assertTrue(outputs["z"].is_composite)
          self.assertEqual(
              outputs["z"].type_spec,
              tf.SparseTensorSpec([2, 10], tf.float32),
          )
          self.assertTrue(outputs["z"].is_supported_type)
  
          self.assertEqual(
              outputs["r"].get_shape().as_list(), [None, None]
          )
          self.assertEqual(outputs["r"].dtype, tf.float32)
          self.assertFalse(outputs["r"].is_sparse)
          self.assertTrue(outputs["r"].is_composite)
          self.assertEqual(
              outputs["r"].type_spec,
              tf.RaggedTensorSpec([None, None], tf.float32),
          )
          self.assertTrue(outputs["r"].is_supported_type)
  
file_path: hub/tensorflow_hub/tensor_info_test.py
imports: import tensorflow
  from tensorflow_hub import tensor_info
label_desc: Use image node_id 1 for calling the TensorInfoTest obj's underlying member method code with example usage: obj.testParsingTensorInfoProtoMaps() without return types