# Path: tensorflow_transform/tf_metadata/schema_utils.py
# TENSOR_REPRESENTATION_GROUP = ''
# RAGGED_TENSOR_TAG = 'ragged_tensor'
# _DEPRECATED_LIFECYCLE_STAGES = [
#     schema_pb2.DEPRECATED, schema_pb2.DISABLED, schema_pb2.PLANNED,
#     schema_pb2.ALPHA, schema_pb2.DEBUG_ONLY
# ]
# _LEGACY_DEFAULT_VALUE_FOR_DTYPE = {tf.string: '', tf.int64: -1, tf.float32: -1}
# def schema_from_feature_spec(
#     feature_spec: Mapping[str, common_types.FeatureSpecType],
#     domains: Optional[Mapping[str, common_types.DomainType]] = None
# ) -> schema_pb2.Schema:
# def _ragged_tensor_representation_from_feature_spec(
#     spec: common_types.RaggedFeature, name: str,
#     domains: Dict[str, common_types.DomainType]
# ) -> Tuple[schema_pb2.Feature, List[schema_pb2.Feature],
# def _sparse_feature_from_feature_spec(spec, name, domains):
# def _feature_from_feature_spec(spec, name, domains):
# def _set_type(name, feature, dtype):
# def _set_domain(name, feature, domain):
# def schema_as_feature_spec(
#     schema_proto: schema_pb2.Schema) -> SchemaAsFeatureSpecResult:
# def _get_string_domains(schema):
# def _get_domain(feature, string_domains):
# def pop_ragged_source_columns(
#     name: str, tensor_representation: schema_pb2.TensorRepresentation,
#     feature_by_name: Dict[str, schema_pb2.Feature]) -> schema_pb2.Feature:
# def _ragged_tensor_representation_as_feature_spec(
#     name: str, tensor_representation: schema_pb2.TensorRepresentation,
#     feature_by_name: Dict[str, schema_pb2.Feature],
#     string_domains: Dict[str, common_types.DomainType]
# ) -> Tuple[common_types.RaggedFeature, Optional[common_types.DomainType]]:
# def _sparse_feature_as_feature_spec(feature, feature_by_name, string_domains):
# def _feature_as_feature_spec(feature, string_domains):
# def _feature_dtype(feature):
# def _fixed_shape_as_tf_shape(fixed_shape):
# def _include_in_parsing_spec(feature):
# def _legacy_schema_from_feature_spec(feature_spec, domains=None):
# def _legacy_schema_as_feature_spec(schema_proto):
# def _legacy_feature_as_feature_spec(feature):
# def _legacy_infer_default_value(feature_proto, dtype):


import tensorflow as tf
from tensorflow_transform.tf_metadata import schema_utils
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Common data and utilities for tf_metadata tests."""




test_feature_spec = {
    # FixedLenFeatures
    'fixed_categorical_int_with_range':
        tf.io.FixedLenFeature(shape=[], dtype=tf.int64),
    'fixed_int':
        tf.io.FixedLenFeature(shape=[5], dtype=tf.int64),
    'fixed_float':
        tf.io.FixedLenFeature(shape=[5], dtype=tf.float32),
    'fixed_string':
        tf.io.FixedLenFeature(shape=[5], dtype=tf.string),

    # VarLenFeatures
    'var_int':
        tf.io.VarLenFeature(dtype=tf.int64),
    'var_float':
        tf.io.VarLenFeature(dtype=tf.float32),
    'var_string':
        tf.io.VarLenFeature(dtype=tf.string),
}


def get_test_schema():

# Path: tensorflow_transform/tf_metadata/schema_utils.py
# TENSOR_REPRESENTATION_GROUP = ''
# RAGGED_TENSOR_TAG = 'ragged_tensor'
# _DEPRECATED_LIFECYCLE_STAGES = [
#     schema_pb2.DEPRECATED, schema_pb2.DISABLED, schema_pb2.PLANNED,
#     schema_pb2.ALPHA, schema_pb2.DEBUG_ONLY
# ]
# _LEGACY_DEFAULT_VALUE_FOR_DTYPE = {tf.string: '', tf.int64: -1, tf.float32: -1}
# def schema_from_feature_spec(
#     feature_spec: Mapping[str, common_types.FeatureSpecType],
#     domains: Optional[Mapping[str, common_types.DomainType]] = None
# ) -> schema_pb2.Schema:
# def _ragged_tensor_representation_from_feature_spec(
#     spec: common_types.RaggedFeature, name: str,
#     domains: Dict[str, common_types.DomainType]
# ) -> Tuple[schema_pb2.Feature, List[schema_pb2.Feature],
# def _sparse_feature_from_feature_spec(spec, name, domains):
# def _feature_from_feature_spec(spec, name, domains):
# def _set_type(name, feature, dtype):
# def _set_domain(name, feature, domain):
# def schema_as_feature_spec(
#     schema_proto: schema_pb2.Schema) -> SchemaAsFeatureSpecResult:
# def _get_string_domains(schema):
# def _get_domain(feature, string_domains):
# def pop_ragged_source_columns(
#     name: str, tensor_representation: schema_pb2.TensorRepresentation,
#     feature_by_name: Dict[str, schema_pb2.Feature]) -> schema_pb2.Feature:
# def _ragged_tensor_representation_as_feature_spec(
#     name: str, tensor_representation: schema_pb2.TensorRepresentation,
#     feature_by_name: Dict[str, schema_pb2.Feature],
#     string_domains: Dict[str, common_types.DomainType]
# ) -> Tuple[common_types.RaggedFeature, Optional[common_types.DomainType]]:
# def _sparse_feature_as_feature_spec(feature, feature_by_name, string_domains):
# def _feature_as_feature_spec(feature, string_domains):
# def _feature_dtype(feature):
# def _fixed_shape_as_tf_shape(fixed_shape):
# def _include_in_parsing_spec(feature):
# def _legacy_schema_from_feature_spec(feature_spec, domains=None):
# def _legacy_schema_as_feature_spec(schema_proto):
# def _legacy_feature_as_feature_spec(feature):
# def _legacy_infer_default_value(feature_proto, dtype):


# Path: tensorflow_transform/tf_metadata/test_common.py
import tensorflow as tf
from tensorflow_transform.tf_metadata import schema_utils

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Common data and utilities for tf_metadata tests."""




test_feature_spec = {
    # FixedLenFeatures
    'fixed_categorical_int_with_range':
        tf.io.FixedLenFeature(shape=[], dtype=tf.int64),
    'fixed_int':
        tf.io.FixedLenFeature(shape=[5], dtype=tf.int64),
    'fixed_float':
        tf.io.FixedLenFeature(shape=[5], dtype=tf.float32),
    'fixed_string':
        tf.io.FixedLenFeature(shape=[5], dtype=tf.string),

    # VarLenFeatures
    'var_int':
        tf.io.VarLenFeature(dtype=tf.int64),
    'var_float':
        tf.io.VarLenFeature(dtype=tf.float32),
    'var_string':
        tf.io.VarLenFeature(dtype=tf.string),
}


def get_test_schema():

  return schema_utils.schema_from_feature_spec(test_feature_spec)