code: def get_conditional_loglikelihood(
      self,
      texts: list,
      completion_offset: int,
      tokens_to_explain: list = [],
  ):
      prompt = texts[0]
      retry = 0
      # TODO: make the below logic better.
      # Handle content filtering
      while True:
          retry += 1
          try:
              response = openai.Completion.create(
                  engine=self.engine,
                  prompt=prompt,
                  temperature=0,
                  max_tokens=0,
                  top_p=1.0,
                  frequency_penalty=0,
                  presence_penalty=0,
                  stop=None,
                  logprobs=0,
                  echo=True,
              )
              break
          except Exception as e:
              print(e, prompt, "sleep")
              if retry >= 10:
                  return -1, -1
                  break
              else:
                  time.sleep(1)
                  continue
  
      _, token_logprobs = (
          response["choices"][0]["logprobs"]["tokens"],
          response["choices"][0]["logprobs"]["token_logprobs"],
      )
      target_logprobs = token_logprobs[-completion_offset:]
      return -np.mean(target_logprobs), np.sum(target_logprobs)
  
file_path: interpret-text/python/interpret_text/generative/model_lib/openai_tooling.py
imports: import tiktoken
  import openai
  from tqdm import tqdm
  import time
  import torch
  import numpy
  from scipy.special import logsumexp, log_softmax
label_desc: Use image node_id 4 for calling the CompletionsOpenAI obj's underlying member method code with example usage: obj.get_conditional_loglikelihood(texts, completion_offset, tokens_to_explain) and returns: unknown,  np, unknown,  unknown