def _assemble(self, tile_mat: dict, x_org: "torch.Tensor") -> "torch.Tensor":  # pylint: disable=R0201
        """
        Combine the best patches from each grid into a single image.

        :param tile_mat: Internal structure used to store patches for each mesh.
        :param x_org: The original images.
        :return: Perturbed images.
        """
        import torch

        ans = x_org.clone()
        for obj in tile_mat.values():
            [x_1, y_1, x_2, y_2] = obj.xyxy.type(torch.IntTensor)
            tile = obj.patch_list[0].patch[None, :]
            mask = torch.where(tile != 0, torch.ones_like(tile), torch.zeros_like(tile))
            ans[0, :, y_1:y_2, x_1:x_2] = mask * tile + (1.0 - mask) * ans[0, :, y_1:y_2, x_1:x_2]
        return ans

        Combine the best patches from each grid into a single image.

        :param tile_mat: Internal structure used to store patches for each mesh.
        :param x_org: The original images.
        :return: Perturbed images.
        
art/attacks/evasion/steal_now_attack_later/steal_now_attack_later.py