code: def test_infer_feature_schema_bad_rank(self, use_compat_v1):
      if not use_compat_v1:
          test_case.skip_if_not_tf2("Tensorflow 2.x required")
      inputs = {"x": 0}
      input_signature = {"x": tf.TensorSpec([], dtype=tf.float32)}
      with self.assertRaises(ValueError):
          self._get_schema(
              _make_tensors,
              use_compat_v1,
              inputs=inputs,
              input_signature=input_signature,
          )
  
imports: import functools
  import os
  import tensorflow
  from tensorflow_transform import analyzers
  from tensorflow_transform import common
  from tensorflow_transform import graph_context
  from tensorflow_transform import mappers
  from tensorflow_transform import schema_inference
  from tensorflow_transform import tf2_utils
  from tensorflow_transform import test_case
  from tensorflow_transform.tf_metadata import schema_utils_legacy
  from tensorflow_transform.tf_metadata import schema_utils
  from google.protobuf import text_format
  import unittest
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 3 for calling the SchemaInferenceTest obj's underlying member method code with example usage: obj.test_infer_feature_schema_bad_rank(use_compat_v1) without return types