code: def test_infer_feature_schema(
      self,
      make_tensors_fn,
      feature_spec,
      use_compat_v1,
      domains=None,
      create_session=False,
  ):
      if not use_compat_v1:
          test_case.skip_if_not_tf2("Tensorflow 2.x required")
      x_val = "0" if feature_spec["x"].dtype == tf.string else 0
      inputs = {"x": [x_val]}
      input_signature = {
          "x": tf.TensorSpec([None], dtype=feature_spec["x"].dtype)
      }
      schema = self._get_schema(
          make_tensors_fn,
          use_compat_v1,
          inputs=inputs,
          input_signature=input_signature,
          create_session=create_session,
      )
      expected_schema = schema_utils.schema_from_feature_spec(
          feature_spec, domains
      )
      self.assertEqual(schema, expected_schema)
  
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 2 for calling the SchemaInferenceTest obj's underlying member method code with example usage: obj.test_infer_feature_schema(make_tensors_fn, feature_spec, use_compat_v1, domains, create_session) without return types