code: def preprocess_predicts(
      self, predicts: List[np.array]
  ) -> List[np.array]:
      # Reshape predicts to 4d (idx, width, height, channels)
      reshaped_predicts = list(map(atleast_4d, predicts))
  
      # And check image sizes
      img_wh = [predict.shape[1:3] for predict in reshaped_predicts]
      invalid_sizes = (
          len(set(img_wh)) > 1
      )  # Can merge only images of the same size
      if invalid_sizes:
          raise ValueError(
              "Can't merge images of different sizes: " + str(img_wh)
          )
  
      return reshaped_predicts
  
imports: from typing import List, Iterable, Union, Optional
  import numpy
  from golem.core.log import default_log
  from golem.utilities.data_structures import are_same_length
  from fedot.core.data.array_utilities import find_common_elements, atleast_2d, atleast_4d, flatten_extra_dim
  from fedot.core.data.data import OutputData, InputData
  from fedot.core.data.merge.supplementary_data_merger import SupplementaryDataMerger
  from fedot.core.repository.dataset_types import DataTypesEnum
label_desc: Use image node_id 1 for calling the ImageDataMerger obj's underlying member method code with example usage: obj.preprocess_predicts(predicts) and returns: reshaped_predicts