code: def loglikelihood(self, requests):
      output = []
  
      r = self.convert_requests(requests)
      zero_example = process_request(requests[0], self.seq)
  
      for b in tqdm(
          sample_batch(r, self.batch, zero_example),
          desc="LM eval harness",
          total=len(requests) // self.batch,
      ):
          if self.shrink:
              b = shrink_seq(b, min_seq=self.min_seq)
  
          out = self.tpu.eval(b)
  
          for loss, correct in zip(
              out["mask_loss"], out["each_correct"]
          ):
              output.append((float(-loss), bool(correct)))
  
      return output
  
file_path: mesh-transformer-jax/tasks/eval_harness.py
imports: from functools import partial
  import transformers
  from lm_eval.base import LM
  from tqdm import tqdm
  import numpy
  from tasks.util import sample_batch, shrink_seq
  import multiprocessing
  import ftfy
label_desc: Use image node_id 5 for calling the EvalHarnessAdaptor obj's underlying member method code with example usage: obj.loglikelihood(requests) and returns: output