code: def create_validation(target, args=None, **kwargs):
      if "using" not in args:
          raise Exception(
              "OpenAI engine requires a USING clause! Refer to its documentation for more details."
          )
      else:
          args = args["using"]
  
      if (
          len(
              set(args.keys())
              & {
                  "question_column",
                  "prompt_template",
                  "json_struct",
                  "prompt",
              }
          )
          == 0
      ):
          raise Exception(
              "One of `question_column`, `prompt_template` or `json_struct` is required for this engine."
          )
  
      keys_collection = [
          ["prompt_template"],
          ["question_column", "context_column"],
          ["prompt", "user_column", "assistant_column"],
          ["json_struct"],
      ]
      for keys in keys_collection:
          if keys[0] in args and any(
              x[0] in args for x in keys_collection if x != keys
          ):
              raise Exception(
                  textwrap.dedent(
                      """\
                      Please provide one of
                          1) a `prompt_template`
                          2) a `question_column` and an optional `context_column`
                          3) a `json_struct`
                          4) a `prompt' and 'user_column' and 'assistant_column`
                  """
                  )
              )
  
      # for all args that are not expected, raise an error
      known_args = set()
      # flatten of keys_collection
      for keys in keys_collection:
          known_args = known_args.union(set(keys))
  
      # TODO: need a systematic way to maintain a list of known args
      known_args = known_args.union(
          {
              "target",
              "model_name",
              "mode",
              "predict_params",
              "input_text",
              "ft_api_info",
              "ft_result_stats",
              "runtime",
              "max_tokens",
              "temperature",
              "api_key",
              "openai_api_key",
              "api_organization",
              "api_base",
          }
      )
  
      unknown_args = set(args.keys()) - known_args
      if unknown_args:
          # return a list of unknown args as a string
          raise Exception(
              f"Unknown arguments: {', '.join(unknown_args)}.\n Known arguments are: {', '.join(known_args)}"
          )
  
imports: import os
  import math
  import json
  import shutil
  import tempfile
  import datetime
  import textwrap
  import subprocess
  import concurrent.futures
  from typing import Optional, Dict
  import openai
  from openai import OpenAI
  import numpy
  import pandas
  from mindsdb.utilities.hooks import before_openai_query, after_openai_query
  from mindsdb.utilities import log
  from mindsdb.integrations.libs.base import BaseMLEngine
  from mindsdb.integrations.handlers.openai_handler.helpers import retry_with_exponential_backoff, truncate_msgs_for_token_limit, get_available_models, PendingFT
  from mindsdb.integrations.handlers.openai_handler.constants import CHAT_MODELS, IMAGE_MODELS, FINETUNING_MODELS, OPENAI_API_BASE
  from mindsdb.integrations.utilities.handler_utils import get_api_key
  from mindsdb.integrations.libs.llm_utils import get_completed_prompts
label_desc: Use image node_id 2 for calling the OpenAIHandler obj's underlying member method code with example usage: obj.create_validation(target, args) without return types