code: def patternProperties(validator, patternProperties, instance, schema):
      if not validator.is_type(instance, "object"):
          return
  
      for pattern, subschema in iteritems(patternProperties):
          for k, v in iteritems(instance):
              if re.search(pattern, k):
                  for error in validator.descend(
                      v,
                      subschema,
                      path=k,
                      schema_path=pattern,
                  ):
                      yield error
  
imports: import re
  from jsonschema._utils import ensure_list, equal, extras_msg, find_additional_properties, types_msg, unbool, uniq
  from jsonschema.exceptions import FormatError, ValidationError
  from jsonschema.compat import iteritems
label_desc: Use image node_id 1 for calling a global function with example usage: patternProperties(validator, patternProperties, instance, schema) without return types