code: def validate_json_ai(json_ai: JsonAI) -> bool:
      """
      Checks the validity of a ``JsonAI`` object
  
      :param json_ai: A ``JsonAI`` object
  
      :returns: Whether the JsonAI is valid, i.e. doesn't contain prohibited values, unknown values and can be turned into code.
      """  # noqa
      from lightwood.api.high_level import (
          predictor_from_code,
          code_from_json_ai,
      )
  
      try:
          predictor_from_code(code_from_json_ai(json_ai))
          return True
      except Exception:
          return False
  
file_path: lightwood/lightwood/api/json_ai.py
imports: import inspect
  from type_infer.dtype import dtype
  from type_infer.base import TypeInformation
  from dataprep_ml import StatisticalAnalysis
  from lightwood.helpers.templating import _consolidate_analysis_blocks, _add_cls_kwarg
  from lightwood.helpers.constants import IMPORTS, IMPORT_EXTERNAL_DIRS
  from lightwood.api.types import JsonAI, ProblemDefinition
  import lightwood.ensemble
  import lightwood.encoder
label_desc: Use image node_id 6 for calling a global function with example usage: validate_json_ai(json_ai) and returns: True, False