def METHOD_NAME(self, corpus: List[Dict[str, str]], **kwargs) -> np.ndarray:
    if args.doc_as_query:
        return self.encode_queries([d['text'] for d in corpus], **kwargs)
    input_texts = ['{} {}'.format(doc.get('title', ''), doc['text']).strip() for doc in corpus]
    input_texts = ['passage: {}'.format(t) for t in input_texts]
    return self._do_encode(input_texts)