code: def type_draft3(validator, types, instance, schema):
      types = _utils.ensure_list(types)
  
      all_errors = []
      for index, type in enumerate(types):
          if validator.is_type(type, "object"):
              errors = list(
                  validator.descend(instance, type, schema_path=index)
              )
              if not errors:
                  return
              all_errors.extend(errors)
          else:
              if validator.is_type(instance, type):
                  return
      else:
          yield ValidationError(
              _utils.types_msg(instance, types),
              context=all_errors,
          )
  
file_path: catboost/contrib/python/jsonschema/py2/jsonschema/_legacy_validators.py
imports: from jsonschema import _utils
  from jsonschema.compat import iteritems
  from jsonschema.exceptions import ValidationError
label_desc: Use image node_id 8 for calling a global function with example usage: type_draft3(validator, types, instance, schema) without return types