code: def eval_precision_bm45_dataloader(
      dataloader, ks=[1, 5, 10], number_of_samples=None
  ):
      label_ids = torch.cat(
          [label_ids for _, _, _, label_ids, _ in dataloader]
      )
      label_ids = label_ids + 1
      p = {}
  
      for k in ks:
          p[k] = 0
  
      for label in label_ids:
          if label > 0:
              for k in ks:
                  if label <= k:
                      p[k] += 1
  
      for k in ks:
          if number_of_samples is None:
              p[k] /= len(label_ids)
          else:
              p[k] /= number_of_samples
  
      return p
  
imports: import os
  import io
  import sys
  import json
  import torch
  import logging
  import numpy
  from collections import OrderedDict
  from pytorch_transformers.modeling_utils import CONFIG_NAME, WEIGHTS_NAME
  from tqdm import tqdm
  from blink.candidate_ranking.bert_reranking import BertReranker
  from blink.biencoder.biencoder import BiEncoderRanker
label_desc: Use image node_id 4 for calling a global function with example usage: eval_precision_bm45_dataloader(dataloader, ks, number_of_samples) and returns: p