    def get_metric(
        self, reset: bool = False
    ) -> Dict[int, Union[torch.Tensor, Dict[int, torch.Tensor]]]:
        """
        # Returns

        gaps : `Dict[int, Union[torch.FloatTensor, Dict[int, torch.FloatTensor]]]`
            A dictionary mapping each protected variable label x to either:

            1. a tensor of the one-vs-all gaps (where the gap corresponding to prediction
            label i is at index i),

            2. another dictionary mapping protected variable labels x' to a tensor
            of the pairwise gaps (where the gap corresponding to prediction label i is at index i).
            A gap of nearly 0 implies fairness on the basis of Association in the Absence of Ground Truth.

        !!! Note
            If a possible class label is not present in Y, the expected behavior is that
            the gaps corresponding to this class label are NaN. If a possible (class label,
            protected variable label) pair is not present in the joint of Y and X, the expected
            behavior is that the gap corresponding to this (class label, protected variable label)
            pair is NaN.
        """
        gaps = {}
        for x in range(self._num_protected_variable_labels):
            gaps[x] = self.gap_func(x)
        if reset:
            self.reset()
        return gaps
# Returns

gaps : `Dict[int, Union[torch.FloatTensor, Dict[int, torch.FloatTensor]]]`
A dictionary mapping each protected variable label x to either:

1. a tensor of the one-vs-all gaps (where the gap corresponding to prediction
label i is at index i),

2. another dictionary mapping protected variable labels x' to a tensor
of the pairwise gaps (where the gap corresponding to prediction label i is at index i).
A gap of nearly 0 implies fairness on the basis of Association in the Absence of Ground Truth.

!!! Note
If a possible class label is not present in Y, the expected behavior is that
the gaps corresponding to this class label are NaN. If a possible (class label,
protected variable label) pair is not present in the joint of Y and X, the expected
behavior is that the gap corresponding to this (class label, protected variable label)
pair is NaN.
allennlp/fairness/bias_metrics.py