code: def dependencies(validator, dependencies, instance, schema):
      if not validator.is_type(instance, "object"):
          return
  
      for property, dependency in iteritems(dependencies):
          if property not in instance:
              continue
  
          if validator.is_type(dependency, "array"):
              for each in dependency:
                  if each not in instance:
                      message = "%r is a dependency of %r"
                      yield ValidationError(message % (each, property))
          else:
              for error in validator.descend(
                  instance,
                  dependency,
                  schema_path=property,
              ):
                  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 20 for calling a global function with example usage: dependencies(validator, dependencies, instance, schema) without return types