    def _calculate_influence_scores(
        self, test_instance: Instance, test_loss: float, test_grads: Sequence[torch.Tensor]
    ) -> List[float]:
        """
        Required to be implemented by subclasses.

        Calculates the influence scores of `self.train_instances` with respect to
        the given `test_instance`.
        """
        raise NotImplementedError
Required to be implemented by subclasses.

Calculates the influence scores of `self.train_instances` with respect to
the given `test_instance`.
allennlp/interpret/influence_interpreters/influence_interpreter.py