class_docstr: The retriever of REALM outputting the retrieved evidence block and whether the block has answers as well as answer
  positions."
  
      Parameters:
          block_records (`np.ndarray`):
              A numpy array which cantains evidence texts.
          tokenizer ([`RealmTokenizer`]):
              The tokenizer to encode retrieved texts.
code: def from_pretrained(
      cls,
      pretrained_model_name_or_path: Optional[Union[str, os.PathLike]],
      *init_inputs,
      **kwargs,
  ):
      if os.path.isdir(pretrained_model_name_or_path):
          block_records_path = os.path.join(
              pretrained_model_name_or_path,
              _REALM_BLOCK_RECORDS_FILENAME,
          )
      else:
          block_records_path = hf_hub_download(
              repo_id=pretrained_model_name_or_path,
              filename=_REALM_BLOCK_RECORDS_FILENAME,
              **kwargs,
          )
      block_records = np.load(block_records_path, allow_pickle=True)
  
      tokenizer = AutoTokenizer.from_pretrained(
          pretrained_model_name_or_path, *init_inputs, **kwargs
      )
  
      return cls(block_records, tokenizer)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/realm/retrieval_realm.py
imports: import os
  from typing import Optional, Union
  import numpy
  from huggingface_hub import hf_hub_download
  from transformers import AutoTokenizer
  from ...utils import logging
label_desc: Use image node_id 3 for calling the RealmRetriever obj's underlying member method code with example usage: obj.from_pretrained(cls, pretrained_model_name_or_path) and returns: cls