code: def validate_final_structure(
      item, structure=function_calling_output_structure
  ):
      if isinstance(item, list):
          if not all(
              validate_final_structure(i, structure[0]) for i in item
          ):
              return Exception(
                  "Function calling final output doesn't match expected output format"
              )
      elif isinstance(item, dict):
          if not all(
              k in item and validate_final_structure(item[k], v)
              for k, v in structure.items()
          ):
              return Exception(
                  "Function calling final output doesn't match expected output format"
              )
      else:
          if not isinstance(item, structure):
              return Exception(
                  "Function calling final output doesn't match expected output format"
              )
      return True
  
imports: import sys, os, asyncio
  import traceback
  import time, pytest
  from dotenv import load_dotenv
  import litellm
  from litellm import completion, acompletion, AuthenticationError, BadRequestError, RateLimitError, ModelResponse
label_desc: Use image node_id 28 for calling a global function with example usage: validate_final_structure(item, structure) and returns: True, Exception, Exception, Exception