# Path: tensorflow_transform/common_types.py
# def is_ragged_feature_available() -> bool:
# def is_ragged_feature(spec: FeatureSpecType) -> bool:


import tensorflow as tf
from tensorflow_transform import common_types
from google.protobuf import text_format
from tensorflow_metadata.proto.v0 import schema_pb2
            'schema_level_string_domain',
        'ascii_proto':
            """
          feature: {name: "x" type: BYTES domain: "my_domain"}
          string_domain {name: "my_domain" value: "a" value: "b"}
        """,
        'feature_spec': {
            'x': tf.io.VarLenFeature(tf.string)
        },
        'domains': {
            'x': schema_pb2.StringDomain(name='my_domain', value=['a', 'b'])
        }
    },
    {
        'testcase_name':
            'missing_schema_level_string_domain',
        'ascii_proto':
            """
          feature: {name: "x" type: BYTES domain: "my_domain"}
        """,
        'feature_spec': {
            'x': tf.io.VarLenFeature(tf.string)
        }
    },
]

INVALID_SCHEMA_PROTOS = [
    {
        'testcase_name': 'no_type',
        'ascii_proto': """

# Path: tensorflow_transform/common_types.py
# def is_ragged_feature_available() -> bool:
# def is_ragged_feature(spec: FeatureSpecType) -> bool:


# Path: tensorflow_transform/tf_metadata/schema_utils_test_cases.py
import tensorflow as tf
from tensorflow_transform import common_types
from google.protobuf import text_format
from tensorflow_metadata.proto.v0 import schema_pb2

            'schema_level_string_domain',
        'ascii_proto':
            """
          feature: {name: "x" type: BYTES domain: "my_domain"}
          string_domain {name: "my_domain" value: "a" value: "b"}
        """,
        'feature_spec': {
            'x': tf.io.VarLenFeature(tf.string)
        },
        'domains': {
            'x': schema_pb2.StringDomain(name='my_domain', value=['a', 'b'])
        }
    },
    {
        'testcase_name':
            'missing_schema_level_string_domain',
        'ascii_proto':
            """
          feature: {name: "x" type: BYTES domain: "my_domain"}
        """,
        'feature_spec': {
            'x': tf.io.VarLenFeature(tf.string)
        }
    },
]

INVALID_SCHEMA_PROTOS = [
    {
        'testcase_name': 'no_type',
        'ascii_proto': """

          feature: {name: "x"}