code: def test_transform_pipeline_serialization(seed, image, mask):
      aug = A.Compose(
          [
              A.OneOrOther(
                  A.Compose(
                      [
                          A.Resize(1024, 1024),
                          A.RandomSizedCrop(
                              min_max_height=(256, 1024),
                              height=512,
                              width=512,
                              p=1,
                          ),
                          A.OneOf(
                              [
                                  A.RandomSizedCrop(
                                      min_max_height=(256, 512),
                                      height=384,
                                      width=384,
                                      p=0.5,
                                  ),
                                  A.RandomSizedCrop(
                                      min_max_height=(256, 512),
                                      height=512,
                                      width=512,
                                      p=0.5,
                                  ),
                              ]
                          ),
                      ]
                  ),
                  A.Compose(
                      [
                          A.Resize(1024, 1024),
                          A.RandomSizedCrop(
                              min_max_height=(256, 1025),
                              height=256,
                              width=256,
                              p=1,
                          ),
                          A.OneOf(
                              [
                                  A.HueSaturationValue(p=0.5),
                                  A.RGBShift(p=0.7),
                              ],
                              p=1,
                          ),
                      ]
                  ),
              ),
              A.SomeOf(
                  [
                      A.HorizontalFlip(p=1),
                      A.Transpose(p=1),
                      A.HueSaturationValue(p=0.5),
                      A.RandomBrightnessContrast(p=0.5),
                  ],
                  2,
                  replace=False,
              ),
          ]
      )
      serialized_aug = A.to_dict(aug)
      deserialized_aug = A.from_dict(serialized_aug)
      set_seed(seed)
      aug_data = aug(image=image, mask=mask)
      set_seed(seed)
      deserialized_aug_data = deserialized_aug(image=image, mask=mask)
      assert np.array_equal(
          aug_data["image"], deserialized_aug_data["image"]
      )
      assert np.array_equal(
          aug_data["mask"], deserialized_aug_data["mask"]
      )
  
imports: import json
  import os
  import random
  from unittest.mock import patch
  import cv2
  import numpy
  import pytest
  import albumentations
  import albumentations.augmentations.functional
  import albumentations.augmentations.geometric.functional
  from albumentations.core.serialization import SERIALIZABLE_REGISTRY, shorten_class_name
  from albumentations.core.transforms_interface import ImageOnlyTransform
  from .conftest import skipif_no_torch
  from .utils import OpenMock, check_all_augs_exists, get_image_only_transforms, get_transforms, set_seed
label_desc: Use image node_id 8 for calling a global function with example usage: test_transform_pipeline_serialization(seed, image, mask) without return types