code: def create_validation(target, args=None, **kwargs):
      args = args["using"]
  
      available_tasks = [
          "text-to-image",
          "image-to-image",
          "image-upscaling",
          "image-masking",
      ]
  
      if "api_key" not in args:
          raise Exception("api_key has to be specified")
  
      if "task" not in args:
          raise Exception(
              "task has to be specified. Available tasks are - "
              + available_tasks
          )
  
      if args["task"] not in available_tasks:
          raise Exception(
              "Unknown task specified. Available tasks are - "
              + available_tasks
          )
  
      if "local_directory_path" not in args:
          raise Exception("local_directory_path has to be specified")
  
      client = StabilityAPIClient(
          args["api_key"], args["local_directory_path"]
      )
  
      if "engine_id" in args:
          if not client._is_valid_engine(args["engine_id"]):
              raise Exception(
                  "Unknown engine. The available engines are - "
                  + list(client.available_engines.keys())
              )
      else:
          args["engine_id"] = "stable-diffusion-xl-1024-v1-0"
  
      if "upscale_engine_id" in args:
          if not client._is_valid_engine(args["upscale_engine_id"]):
              raise Exception(
                  "Unknown engine. The available engines are - "
                  + list(client.available_engines.keys())
              )
      else:
          args["upscale_engine_id"] = "esrgan-v1-x2plus"
  
file_path: mindsdb/mindsdb/integrations/handlers/stabilityai_handler/stabilityai_handler.py
imports: from typing import Optional, Dict
  import pandas
  from mindsdb.integrations.handlers.stabilityai_handler.stabilityai import StabilityAPIClient
  from mindsdb.integrations.libs.base import BaseMLEngine
  from mindsdb.utilities import log
label_desc: Use image node_id 1 for calling the StabilityAIHandler obj's underlying member method code with example usage: obj.create_validation(target, args) without return types