code: def validate_index(name, checks, index):
      missing = [
          i
          for check, i in checks
          if not re.compile(check).search(index)
      ]
      if missing:
          plural = "s" if len(missing) > 1 else ""
          raise exceptions.InvalidIndexException(
              f"Missing item{plural} {', '.join(missing)} in {name}."
          )
  
imports: from collections.abc import MutableSequence
  import re
  from textwrap import dedent
  from keyword import iskeyword
  import flask
  from ._grouping import grouping_len, map_grouping
  from .development.base_component import Component
  from .None import exceptions
  from ._utils import patch_collections_abc, stringify_id, to_json, coerce_to_list, clean_property_name
label_desc: Use image node_id 11 for calling a global function with example usage: validate_index(name, checks, index) without return types