def calculate_embeddings_difference(self, embedding_1: ndarray, embedding_2: ndarray):
        """
        Calculate the difference between two embeddings.

        We use the mean absolute error (MAE) to calculate the difference between the two embeddings after normalizing
        them.
        """

        if embedding_1.shape != embedding_2.shape:
            raise ValueError("The two embeddings must have the same shape.")

        embedding_1 = embedding_1 / np.linalg.norm(embedding_1)
        embedding_2 = embedding_2 / np.linalg.norm(embedding_2)

        return np.mean(np.abs(embedding_1 - embedding_2))

        Calculate the difference between two embeddings.

        We use the mean absolute error (MAE) to calculate the difference between the two embeddings after normalizing
        them.
        
tests/integ_tests/inference/inference_test_case.py