import tensorflow as tf

          create_session=True))
  # pylint: enable=g-long-lambda
  def test_infer_feature_schema(self,
                                make_tensors_fn,
                                feature_spec,
                                domains=None,
                                create_session=False):
    with tf.compat.v1.Graph().as_default() as graph:
      tensors = make_tensors_fn()

    if create_session:
      with tf.compat.v1.Session(graph=graph) as session:
        schema = schema_inference.infer_feature_schema(tensors, graph, session)
    else:
