def poison(
        self,
        x: np.ndarray | list[np.ndarray],
        y: list[dict[str, np.ndarray]],
        **kwargs,
    ) -> tuple[np.ndarray | list[np.ndarray], list[dict[str, np.ndarray]]]:
        """
        Generate poisoning examples and return them as an array. This method should be overridden by all concrete
        poisoning attack implementations.

        :param x: An array with the original inputs to be attacked.
        :param y: True labels of type `list[dict[np.ndarray]]`, one dictionary per input image.
                  The keys and values of the dictionary are:
                  - boxes [N, 4]: the boxes in [x1, y1, x2, y2] format, with 0 <= x1 < x2 <= W and 0 <= y1 < y2 <= H.
                  - labels [N]: the labels for each image
                  - scores [N]: the scores or each prediction.
        :return: A tuple holding the `(poisoning_examples, poisoning_labels)`.
        """
        raise NotImplementedError

        Generate poisoning examples and return them as an array. This method should be overridden by all concrete
        poisoning attack implementations.

        :param x: An array with the original inputs to be attacked.
        :param y: True labels of type `list[dict[np.ndarray]]`, one dictionary per input image.
                  The keys and values of the dictionary are:
                  - boxes [N, 4]: the boxes in [x1, y1, x2, y2] format, with 0 <= x1 < x2 <= W and 0 <= y1 < y2 <= H.
                  - labels [N]: the labels for each image
                  - scores [N]: the scores or each prediction.
        :return: A tuple holding the `(poisoning_examples, poisoning_labels)`.
        
art/attacks/attack.py