code: def test_dataset_concatenate_nested_image_features(shared_datadir):
      # we use a different data structure between 1 and 2 to make sure they are compatible with each other
      image_path = str(shared_datadir / "test_image_rgb.jpg")
      features = Features(
          {"list_of_structs_of_images": [{"image": Image()}]}
      )
      data1 = {"list_of_structs_of_images": [[{"image": image_path}]]}
      dset1 = Dataset.from_dict(data1, features=features)
      data2 = {
          "list_of_structs_of_images": [
              [{"image": {"bytes": open(image_path, "rb").read()}}]
          ]
      }
      dset2 = Dataset.from_dict(data2, features=features)
      concatenated_dataset = concatenate_datasets([dset1, dset2])
      assert len(concatenated_dataset) == len(dset1) + len(dset2)
      assert (
          concatenated_dataset[0]["list_of_structs_of_images"][0][
              "image"
          ]
          == dset1[0]["list_of_structs_of_images"][0]["image"]
      )
      assert (
          concatenated_dataset[1]["list_of_structs_of_images"][0][
              "image"
          ]
          == dset2[0]["list_of_structs_of_images"][0]["image"]
      )
  
imports: import os
  import tarfile
  import warnings
  import numpy
  import pandas
  import pyarrow
  import pytest
  from datasets import Dataset, Features, Image, Sequence, Value, concatenate_datasets, load_dataset
  from datasets.features.image import encode_np_array, image_to_bytes
  from ..utils import require_pil
label_desc: Use image node_id 14 for calling a global function with example usage: test_dataset_concatenate_nested_image_features(shared_datadir) without return types