code: def if_(validator, if_schema, instance, schema):
      if validator.is_valid(instance, if_schema):
          if "then" in schema:
              then = schema["then"]
              for error in validator.descend(
                  instance, then, schema_path="then"
              ):
                  yield error
      elif "else" in schema:
          else_ = schema["else"]
          for error in validator.descend(
              instance, else_, schema_path="else"
          ):
              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 32 for calling a global function with example usage: if_(validator, if_schema, instance, schema) without return types