def METHOD_NAME(local_ds):
    dataset_structure = DatasetStructure(ignore_one_group=False)
    dataset_structure.add_first_level_tensor(
        TensorStructure("tensor1", params={"htype": "generic"})
    )
    dataset_structure.add_first_level_tensor(
        TensorStructure(
            "images",
            params={"htype": "image", "sample_compression": "jpeg"},
        )
    )
    group = GroupStructure(
        "annotations", items=[TensorStructure("bboxes", params={"htype": "bbox"})]
    )
    group.add_item(TensorStructure("keypoints", params={"htype": "keypoints_coco"}))
    group.add_item(TensorStructure("masks", params={"htype": "binary_mask"}))
    sub_group = GroupStructure("sub_annotations")
    sub_group.add_item(TensorStructure("sub_tensor1", params={"htype": "generic"}))
    sub_group.add_item(TensorStructure("sub_tensor2", params={"htype": "generic"}))
    group.add_item(sub_group)
    dataset_structure.add_group(group)
    assert dataset_structure.all_keys == {
        "images",
        "tensor1",
        "annotations/bboxes",
        "annotations/keypoints",
        "annotations/masks",
        "annotations/sub_annotations/sub_tensor1",
        "annotations/sub_annotations/sub_tensor2",
    }
    dataset_structure.create_full(local_ds)
    tensors = local_ds.tensors
    assert len(tensors) == 7
    assert "tensor1" in tensors
    assert "annotations/keypoints" in tensors
    assert "annotations/masks" in tensors
    assert "annotations/sub_annotations/sub_tensor1" in tensors