def __call__(self, img, label=None):
        """
        Args:
            img (numpy ndarray): 4D Image to be flipped.
            label (numpy ndarray): 4D Label to be flipped.
        Returns:
            (np.array). Image after transformation.
        """
        if isinstance(self.flip_axis, (tuple, list)):
            flip_axis = self.flip_axis[random.randint(0,
                                                      len(self.flip_axis) - 1)]
        else:
            flip_axis = self.flip_axis

        if random.random() < self.prob:
            img = F.flip_3d(img, axis=flip_axis)
            if label is not None:
                label = F.flip_3d(label, axis=flip_axis - 1)
        return img, label

        Args:
            img (numpy ndarray): 4D Image to be flipped.
            label (numpy ndarray): 4D Label to be flipped.
        Returns:
            (np.array). Image after transformation.
        
contrib/MedicalSeg/medicalseg/transforms/transform.py