code: def validate_array_types():
      all_array_types = (
          (d, p)
          for d, p in walk(SCHEMA)
          if isinstance(d, dict) and d.get("type") == "array"
      )
      all_array_types_with_a_loose_definition = [
          (d, p)
          for (d, p) in all_array_types
          if not isinstance(d.get("items"), dict)
      ]
      to_display_invalid_types = [
          (d, p)
          for d, p in all_array_types_with_a_loose_definition
          if p not in KNOWN_INVALID_TYPES
      ]
  
      if to_display_invalid_types:
          print(
              "Found array type definitions with too loose a definition. "
              "Make sure the object has the items key."
          )
          display_definitions_list(to_display_invalid_types)
      return all_array_types_with_a_loose_definition
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_chart_schema.py
imports: from __future__ import annotations
  import json
  import sys
  from pathlib import Path
label_desc: Use image node_id 5 for calling a global function with example usage: validate_array_types() and returns: all_array_types_with_a_loose_definition