code: def greedy_until(self, requests):
      if not requests:
          return []
  
      res = []
      for request in tqdm(requests):
          inp = request[0]
          until = request[1]
          response = textsynth_completion(
              url=self.api_url
              + "/v1/engines/"
              + self.engine
              + "/completions",
              headers={"Authorization": "Bearer " + self.api_key},
              json={
                  "prompt": inp,
                  "max_tokens": self.max_gen_toks,
                  "top_k": 1,
                  "stop": until,
              },
          )
          resp = response.json()
          if "text" in resp:
              s = resp["text"]
              res.append(s)
          else:
              logger.error(
                  f"The following response does not contain generated `text`. "
                  "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 11 for calling the TextSynthLM obj's underlying member method code with example usage: obj.greedy_until(requests) and returns: res, list