def _get_patch_mask(self, nb_samples: int) -> "torch.Tensor":
        """
        Create patch mask.

        :param nb_samples: Number of samples.
        :return: Patch mask.
        """
        import torch

        image_mask_np = np.ones((self.patch_height, self.patch_width))

        image_mask_np = np.expand_dims(image_mask_np, axis=2)
        image_mask_np = np.broadcast_to(image_mask_np, self.patch_shape)
        image_mask = torch.Tensor(np.array(image_mask_np)).to(self.estimator.device)
        image_mask = torch.stack([image_mask] * nb_samples, dim=0)
        return image_mask

        Create patch mask.

        :param nb_samples: Number of samples.
        :return: Patch mask.
        
art/attacks/evasion/adversarial_texture/adversarial_texture_pytorch.py