code: def loglikelihood(self, requests):
      res = []
      for context, continuation in tqdm(requests):
          response = textsynth_completion(
              url=self.api_url
              + "/v1/engines/"
              + self.engine
              + "/logprob",
              headers={"Authorization": "Bearer " + self.api_key},
              json={"context": context, "continuation": continuation},
          )
          resp = response.json()
          if "logprob" in resp:
              logprob = resp["logprob"]
              is_greedy = resp["is_greedy"]
              res.append((logprob, is_greedy))
          else:
              logger.error(
                  f"The following response does not contain `logprobs`. Got:\n{resp}"
              )
              assert False
      return res
  
imports: import logging
  import os
  import requests
  import time
  from tqdm import tqdm
  from lm_eval.base import BaseLM
label_desc: Use image node_id 9 for calling the TextSynthLM obj's underlying member method code with example usage: obj.loglikelihood(requests) and returns: res