def __call__(self, q_features: List[Dict],
                 c_features: List[Dict],
                 entity_tokens_pos: List[int]) -> Union[List[int], List[np.ndarray]]:
        """ Predicts entity labels (1 if the entity description is appropriate to the context, 0 - otherwise)

        Args:
            q_features: batch of indices of text subwords
            c_features: batch of indices of entity description subwords
            entity_tokens_pos: list of indices of special tokens

        Returns:
            Label indices or class probabilities for each token (not subtoken)

        """
        self.model.eval()

        _input = {'entity_tokens_pos': entity_tokens_pos}
        for elem in ['input_ids', 'attention_mask']:
            inp_elem = [getattr(f, elem) for f in q_features]
            _input[f"q_{elem}"] = torch.LongTensor(inp_elem).to(self.device)
        for elem in ['input_ids', 'attention_mask']:
            inp_elem = [getattr(f, elem) for f in c_features]
            _input[f"c_{elem}"] = torch.LongTensor(inp_elem).to(self.device)

        with torch.no_grad():
            softmax_scores = self.model(**_input)
            if self.return_probas:
                pred = softmax_scores
            else:
                pred = torch.argmax(softmax_scores, dim=1).cpu().numpy()

        return pred
 Predicts entity labels (1 if the entity description is appropriate to the context, 0 - otherwise)

        Args:
            q_features: batch of indices of text subwords
            c_features: batch of indices of entity description subwords
            entity_tokens_pos: list of indices of special tokens

        Returns:
            Label indices or class probabilities for each token (not subtoken)

        
deeppavlov/models/torch_bert/torch_transformers_el_ranker.py