code: def test_nested(self):
      self.assertFeature(
          feature=feature_lib.Sequence(
              {
                  "a": np.str_,
                  "b": {
                      "c": feature_lib.Tensor(
                          shape=(4, 2), dtype=np.int32
                      ),
                      "d": np.uint8,
                  },
              },
              length=None,
          ),
          shape={
              "a": (None,),
              "b": {
                  "c": (None, 4, 2),
                  "d": (None,),
              },
          },
          dtype={
              "a": np.str_,
              "b": {
                  "c": np.int32,
                  "d": np.uint8,
              },
          },
          tests=[
              testing.FeatureExpectationItem(
                  value={
                      "a": ["aa", "b", "ccc"],
                      "b": {
                          "c": np.ones(shape=(3, 4, 2), dtype=np.int32),
                          "d": [1, 2, 3],
                      },
                  },
                  expected={
                      "a": [
                          tf.compat.as_bytes(t)
                          for t in ("aa", "b", "ccc")
                      ],
                      "b": {
                          "c": np.ones(shape=(3, 4, 2), dtype=np.int32),
                          "d": [1, 2, 3],
                      },
                  },
                  expected_np={
                      "a": [b"aa", b"b", b"ccc"],
                      "b": {
                          "c": np.ones(shape=(3, 4, 2), dtype=np.int32),
                          "d": [1, 2, 3],
                      },
                  },
              ),
              testing.FeatureExpectationItem(
                  value={
                      "a": [str(i) for i in range(100)],
                      "b": [
                          {  # pylint: disable=g-complex-comprehension
                              "c": np.ones(
                                  shape=(4, 2), dtype=np.int32
                              ),
                              "d": 5,
                          }
                          for _ in range(100)
                      ],
                  },
                  expected={
                      "a": [
                          tf.compat.as_bytes(str(i)) for i in range(100)
                      ],
                      "b": {
                          "c": np.ones(
                              shape=(100, 4, 2), dtype=np.int32
                          ),
                          "d": [5] * 100,
                      },
                  },
                  expected_np={
                      "a": [str(i).encode() for i in range(100)],
                      "b": {
                          "c": np.ones(
                              shape=(100, 4, 2), dtype=np.int32
                          ),
                          "d": [5] * 100,
                      },
                  },
              ),
              # Test inputs not same sequence length
              testing.FeatureExpectationItem(
                  value={
                      "a": ["aa", "b", "ccc"],
                      "b": {
                          "c": np.ones(shape=(4, 4, 2), dtype=np.int32),
                          "d": [1, 2, 3],
                      },
                  },
                  raise_cls=ValueError,
                  raise_cls_np=ValueError,
                  raise_msg="length of all elements of one sequence should",
              ),
          ],
      )
  
imports: import numpy
  import tensorflow
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import features
label_desc: Use image node_id 3 for calling the SequenceDictFeatureTest obj's underlying member method code with example usage: obj.test_nested() without return types