docstr: The model output is transformed to the relation id and relation name
  Args:
      model_output: List of probability vectors
      nf_samples: contains the information about true and fake samples (0 - true sample and should be included
          to the output, 1 - fake sample)
  Return:
      wikidata_relation_id: List of wiki ids of found relations
      relation_name: List of names of found relations
docstr_tok: ["The","model","output","is","transformed","to","the","relation","id","and","relation","name","Args",":","model_output",":","List","of","probability","vectors","nf_samples",":","contains","the","information","about","true","and","fake","samples","(","0","-","true","sample","and","should","be","included","to","the","output",",","1","-","fake","sample",")","Return",":","wikidata_relation_id",":","List","of","wiki","ids","of","found","relations","relation_name",":","List","of","names","of","found","relations"]
code: def __call__(
      self, model_output: List, nf_samples: List
  ) -> Tuple[List[str], List[str]]:
      """
      The model output is transformed to the relation id and relation name
      Args:
          model_output: List of probability vectors
          nf_samples: contains the information about true and fake samples (0 - true sample and should be included
              to the output, 1 - fake sample)
      Return:
          wikidata_relation_id: List of wiki ids of found relations
          relation_name: List of names of found relations
      """
  
      wikidata_relation_id, relation_name = [], []
  
      for predictions, nf_sample in zip(model_output, nf_samples):
          if nf_sample:
              wikidata_relation_id.append("-")
              relation_name.append("-")
          else:
              rel_indices = np.nonzero(predictions)[0]
  
              for index in rel_indices:
                  if index == 0:
                      wikidata_relation_id.append("-")
                      relation_name.append("no relation")
                      continue
  
                  rel_p = self.id2rel[index]
                  wikidata_relation_id.append(rel_p)
  
                  if rel_p in self.rel2label:
                      relation_name.append(self.rel2label[rel_p])
                  else:
                      relation_name.append("-")
      return wikidata_relation_id, relation_name
  
file_path: DeepPavlov/deeppavlov/models/preprocessors/re_preprocessor.py
imports: from logging import getLogger
  from pathlib import Path
  from typing import Tuple, List, Union
  import numpy
  from transformers import BertTokenizer
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.file import read_json
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
label_desc: Use image node_id 2 for calling the REPostprocessor obj's underlying member method code with example usage: obj.__call__(model_output, nf_samples) and returns: wikidata_relation_id,  relation_name