# Path: sunds/core/spec_dict.py
# class SpecDict(dict):
#   def maybe_set(
#       self,
#       key: str,
#       value: Union[FeaturesOrBool, Any],
#       default: Union[FeaturesOrBool, _Factory] = False,
#   ) -> None:
#   def maybe_update(
#       self,
#       other: FeaturesOrBool,
#       default: FeaturesOrBool = False,
#   ) -> None:
# def labeled_image(
#     labels: LabelArg,
#     **kwargs: Any,
# ) -> tfds.features.LabeledImage:
# def _is_features(features: FeatureSpecs) -> bool:


from typing import Any, NamedTuple
from sunds.core import spec_dict
import pytest
import tensorflow as tf
import tensorflow_datasets as tfds
    [
        _Param(
            value=False,
            default={'x': tfds.features.Image()},
            expected={},
        ),
        _Param(
            value=True,
            default={'x': tfds.features.Image()},
            expected={'x': tfds.features.Image()},
        ),
        _Param(
            value=True,
            default={'x': tf.int64},
            expected={'x': tf.int64},
        ),
        _Param(
            value={
                'x': tfds.features.Text(),
                'y': tf.float32
            },
            default={'x': tfds.features.Image()},
            expected={
                'x': tfds.features.Text(),
                'y': tf.float32
            },
        ),
    ],
)
def test_spec_dict_maybe_update(other, default, expected):

# Path: sunds/core/spec_dict.py
# class SpecDict(dict):
#   def maybe_set(
#       self,
#       key: str,
#       value: Union[FeaturesOrBool, Any],
#       default: Union[FeaturesOrBool, _Factory] = False,
#   ) -> None:
#   def maybe_update(
#       self,
#       other: FeaturesOrBool,
#       default: FeaturesOrBool = False,
#   ) -> None:
# def labeled_image(
#     labels: LabelArg,
#     **kwargs: Any,
# ) -> tfds.features.LabeledImage:
# def _is_features(features: FeatureSpecs) -> bool:


# Path: sunds/core/spec_dict_test.py
from typing import Any, NamedTuple
from sunds.core import spec_dict
import pytest
import tensorflow as tf
import tensorflow_datasets as tfds

    [
        _Param(
            value=False,
            default={'x': tfds.features.Image()},
            expected={},
        ),
        _Param(
            value=True,
            default={'x': tfds.features.Image()},
            expected={'x': tfds.features.Image()},
        ),
        _Param(
            value=True,
            default={'x': tf.int64},
            expected={'x': tf.int64},
        ),
        _Param(
            value={
                'x': tfds.features.Text(),
                'y': tf.float32
            },
            default={'x': tfds.features.Image()},
            expected={
                'x': tfds.features.Text(),
                'y': tf.float32
            },
        ),
    ],
)
def test_spec_dict_maybe_update(other, default, expected):

  spec = spec_dict.SpecDict()