    def __call__(self, evaluation_embeddings: torch.Tensor, bias_direction: torch.Tensor):
        """

        !!! Note
            In the examples below, we treat gender identity as binary, which does not accurately
            characterize gender in real life.

        # Parameters

        evaluation_embeddings : `torch.Tensor`
            A tensor of size (batch_size, ..., dim) of embeddings for which to mitigate bias.
        bias_direction : `torch.Tensor`
            A unit tensor of size (dim, ) representing the concept subspace.

        !!! Note
            All tensors are expected to be on the same device.

        # Returns

        bias_mitigated_embeddings : `torch.Tensor`
            A tensor of the same size as evaluation_embeddings.
        """
        # Some sanity checks
        if evaluation_embeddings.ndim < 2:
            raise ConfigurationError("evaluation_embeddings must have at least two dimensions.")
        if bias_direction.ndim != 1:
            raise ConfigurationError("bias_direction must be one-dimensional.")
        if evaluation_embeddings.size(-1) != bias_direction.size(-1):
            raise ConfigurationError(
                "All embeddings and bias_direction must have the same dimensionality."
            )

        with torch.set_grad_enabled(self.requires_grad):
            bias_direction = bias_direction / torch.linalg.norm(bias_direction)
            return self._remove_component(evaluation_embeddings, bias_direction)
!!! Note
In the examples below, we treat gender identity as binary, which does not accurately
characterize gender in real life.

# Parameters

evaluation_embeddings : `torch.Tensor`
A tensor of size (batch_size, ..., dim) of embeddings for which to mitigate bias.
bias_direction : `torch.Tensor`
A unit tensor of size (dim, ) representing the concept subspace.

!!! Note
All tensors are expected to be on the same device.

# Returns

bias_mitigated_embeddings : `torch.Tensor`
A tensor of the same size as evaluation_embeddings.
allennlp/fairness/bias_mitigators.py